<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


<html>
<head>
	<title>Windows Services information component - CodeProject</title> 
	<link type="text/css" rel="stylesheet" href="http://s.codeproject.com/App_Themes/Std/Css/CodeProject.min.css?dt=2.5.120528.1">

	
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="An article on a Windows Services component; Author: Chandra Hundigam; Updated: 26 Sep 2002; Section: C#; Chapter: Languages; Updated: 26 Sep 2002" />
<meta name="Keywords" content=".NET1.0, C#, Windows, Visual-Studio, Dev, Intermediate,C#,Languages,Free source code, tutorials" />
<meta name="Author" content="Chandra Hundigam" />
<meta name="Rating" content="General" />
<meta name="Robots" content="index, follow, NOODP" />
<meta name="Revisit-After" content="1 days" />
<meta name="application-name" content="The Code Project" />

<meta name="msapplication-navbutton-color" content="#FF9900" />
<meta name="msapplication-tooltip" content="Your Development Resource." />
<meta name="msapplication-starturl" content="http://www.codeproject.com/?pinned=true" />
<meta name="msapplication-task" content="name=Homepage;action-uri=http://www.codeproject.com/;icon-uri=http://www.codeproject.com/favico.ico" />
<meta name="msapplication-task" content="name=Latest Articles;action-uri=http://www.codeproject.com/script/articles/Latest.aspx;icon-uri=http://www.codeproject.com/favico.ico" />
<meta name="msapplication-task" content="name=Questions and Answers;action-uri=http://www.codeproject.com/script/Answers/;icon-uri=http://www.codeproject.com/favico.ico" />
<meta name="msapplication-task" content="name=The Lounge;action-uri=http://www.codeproject.com/Lounge.aspx;icon-uri=http://www.codeproject.com/favico.ico" />

<link rel="dns-prefetch" href="//ajax.googleapis.com" /> 
<link rel="canonical" href="/Articles/2944/Windows-Services-information-component" />


<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - All Topics" href="http://www.codeproject.com/WebServices/ArticleRSS.aspx?cat=1" />
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - MFC/C++" href="http://www.codeproject.com/WebServices/ArticleRSS.aspx?cat=2" />
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - C#" href="http://www.codeproject.com/WebServices/ArticleRSS.aspx?cat=3" />
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - VB.NET" href="http://www.codeproject.com/WebServices/ArticleRSS.aspx?cat=6" />
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - Mobile" href="http://www.codeproject.com/WebServices/ArticleRSS.aspx?cat=18" />
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - ASP.NET" href="http://www.codeproject.com/WebServices/ArticleRSS.aspx?cat=4" />
<link rel="alternate" type="application/rss+xml" title="CodeProject Lounge Postings" href="http://www.codeproject.com/webservices/LoungeRSS.aspx" />
<link rel="search" type="application/opensearchdescription+xml" title="CodeProject" href="http://www.codeproject.com/info/OpenSearch.xml" />

	<base target="_top" />
	<link rel="icon" href="/favicon.ico" type="image/ico" >
<link rel="shortcut icon" href="/favicon.ico"  type="image/ico" >
<link rel="apple-touch-icon" href="/images/FavIcon-Apple.png" type="image/png" >
<script type="text/javascript" language="Javascript">//<![CDATA[
if(top!=self && !/https?:\/\/([a-zA-Z]+\.)?facebook.com\//gi.test(top.location.href))top.location.href=location.href; if(typeof(DemoUrl)!='undefined')document.write(unescape('%3Cme')+'ta http'+'-equiv="re'+'fresh" con'+'tent="1;url='+DemoUrl+unescape('"%3CE'));
function SelfCheck(){ return window.confirm("You are about to reply to your own message. Is this really what you want?");}
function FireNew(elm) { window.location=$(elm).find('a')[0].href;}

function MsgVFrm(MemberID,MsgID,GB,gp,bp,mt){
 if(!GB)document.write("Rate this message: ");
 document.write(unescape("%3Ca href=\"#xx" + MsgID.toString() + "xx\" onclick=\"RateMsg(" + MemberID.toString() + ", " + MsgID.toString() + ","));document.write((GB?"5":"1")+unescape(",0);\"%3E"));
 if(GB) document.write(unescape("%3Cimg height=\"20\" width=\"20\" src=\"/script/Forums/Images/good.png\" alt=\"good\" border=\"0\" align=\"absmiddle\" /%3E "+gp+" "+mt+"%3C/a%3E "));
 else document.write(unescape("%3Cimg height=\"14px\" width=\"14px\" src=\"http://s.codeproject.com/script/Forums/Images/thumbs_down.gif\" alt=\"vote 1\" border=\"0\" align=\"middle\" /%3E%3C/a%3E "));
 if(GB)document.write(" &nbsp;"); else for(var i=1; i<=5;i++)
  document.write(unescape("%3Ca class=\"toolbar nav-link\" href=\"#xx" + MsgID.toString() + "xx\" title=\"vote this message a " + i.toString() + "\" onclick=\"RateMsg(" + MemberID.toString() + ", " + MsgID.toString() + ", " + i.toString() + ",0)\"%3E%3Cb%3E" + i.toString() + "%3C/b%3E%3C/a%3E "));
 document.write(unescape("%3Ca href=\"#xx" + MsgID.toString() + "xx\" onclick=\"RateMsg(" + MemberID.toString() + ", " + MsgID.toString() + ","));document.write((GB?"1":"5")+unescape(",0);\"%3E"));
 if(GB)document.write(unescape("%3Cimg height=\"20\" width=\"20\" src=\"/script/Forums/Images/bad.png\" alt=\"bad\" border=\"0\" align=\"absmiddle\" /%3E "+bp+" "+mt+"%3C/a%3E"));
 else document.write(unescape("%3Cimg height=\"14px\" width=\"14px\" src=\"http://s.codeproject.com/script/Forums/Images/thumbs_up.gif\" border=\"0\" alt=\"vote 5\" align=\"middle\" /%3E%3C/a%3E "));
}

function ReportMsg(userid, msgid, score) {
 if (confirm("Are you sure you want this message removed?"))
  return RateMsg(userid, msgid, score, 0);
 else return false;
}
function RateMsg(memberid, msgid, score, questionId) {
 var req = new XMLHttpRequest();
 req.onreadystatechange = function() {
  if (req.readyState == 4){
   if (req.status == 200){
    var respText = req.responseText;
    var re = new RegExp(unescape("\%3Cdiv\%3E(.*)\%3C/div\%3E"), "g");
    var match = re.exec(respText);
    voteStatus.innerHTML = unescape("%3Cb%3E") + (match&&match.length>1&&match[1])?match[1]:"An error occurred" + unescape("%3C/b%3E");
   } else
    voteStatus.innerHTML = unescape("%3Cb style='color:red'%3EFailed!") + req.statusText + unescape("%3C/b%3E");
  }
 }
 var voteStatus = document.getElementById("MVF" + msgid);
 if (!voteStatus) return;
 voteStatus.innerHTML = unescape("%3Cb style='color:green'%3EVoting...%3C/b%3E");
 var strAction = "/script/Forums/Vote.aspx?js=1&fmid="+memberid.toString()+"&select="+msgid.toString()+"&score="+score.toString()+"&qid="+questionId.toString();
 req.open("GET", strAction, true);
 req.send(null);
  return false;
}
var smoothScroll = true;
var Selected = "-1";
var oldTitle = document.title;
function Pin(elm){
 CloseMsg(Selected);
 Selected=''
 var wrk=elm.parentNode; if(wrk)wrk=wrk.children[0];
 var fc=elm?elm.firstChild:null;
 if (wrk&&!wrk.pinned) {
  OpenMsg(wrk.name, true);wrk.pinned=true;fc.src='http://s.codeproject.com/script/forums/images/pinned.gif';fc.title='Pinned. Click to unpin'
 } else {
  wrk.pinned=false;CloseMsg(wrk.name); fc.src='http://s.codeproject.com/script/forums/images/pin.gif';fc.title='Click to pin message'
 }
 return false;
}
function CloseMsg(msgId) {
 if(!msgId||msgId==''||msgId<0)return;
 var lnk=document.getElementsByName(msgId);
 if(lnk&&lnk.length>0&&lnk[0].pinned)return;
 var hed=document.getElementById('F' + msgId.toString() + '_h0');
 if(hed) hed.className = hed.className.replace("Sel", "UnSel");
 var bdy=document.getElementById('F' + msgId.toString() + '_h1');
 if(bdy) bdy.style.display = 'none';
 if(oldTitle) document.title = oldTitle;
}
function OpenMsg(msgId, keep) {
 if(!msgId||msgId==''||msgId<0)return;
 var bdy=document.getElementById('F' + msgId.toString() + '_h1');
 if(bdy){
  var lnk=document.getElementsByName(msgId);
  if(lnk&&lnk.length>0&&lnk[0].pinned)keep=true;
  if(lnk&&lnk.length>0) { oldTitle=document.title; document.title = lnk[0].innerHTML + ' - CodeProject'; }
  if(keep&&bdy.style.display!='none')return;
  if(bdy.style.display=='none') bdy.style.display='';
  else bdy.style.display = 'none';
 }
 var hed=document.getElementById('F' + msgId.toString() + '_h0');
 if (hed) hed.className = hed.className.replace('UnSel', 'Sel');
 if(bdy&&hed&&bdy.style.display!='none'){
  var webkitWeird=document.documentElement.scrollTop < document.body.scrollTop;
  if (!webkitWeird)document.body.scrollTop = getRealPos(hed, 'Top') - document.body.clientHeight/10;
  EnsureMessageVisible(msgId, true);
 }
}
function EnsureMessageVisible(msgID, bShowTop) {
	var webkitWeird = document.documentElement.scrollTop < document.body.scrollTop;
	var msgHeader = document.getElementById('F' + msgID + '_h0');
	var msgBody = document.getElementById('F' + msgID + '_h1');
	if (!msgBody || !msgHeader) return;
	var scrollContainer = document.documentElement;
	var top = getRealPos(msgHeader, 'Top');
	var bottom = getRealPos(msgBody, 'Top') + msgBody.offsetHeight;
	var scrollTop = webkitWeird? scrollTop = document.body.scrollTop:document.documentElement.scrollTop;
	if (scrollTop > top && !bShowTop) scrollTop = top - scrollContainer.clientHeight / 10;
	if (scrollTop + scrollContainer.clientHeight < bottom) scrollTop = bottom - scrollContainer.clientHeight;
	if (scrollTop > top && bShowTop) scrollTop = top - scrollContainer.clientHeight / 10;
 if (smoothScroll){
  if (webkitWeird) $(document.body).stop().animate({'scrollTop' : scrollTop}, 'fast');
  else $(scrollContainer).stop().animate({'scrollTop' : scrollTop}, 'fast');
 } else {
  if (webkitWeird) document.body.scrollTop = scrollTop;
  else scrollContainer.scrollTop = scrollTop;
 }
}
function getRealPos(i,which) {
	iPos = 0;
	while (i!=null)  {
		iPos += i['offset' + which];
		i = i.offsetParent;
	}
	return iPos;
}
var switchCallback;
function SwitchMessage(e, msgId) {
  if (msgId) msgId=msgId.toString();
  else {
    if(!e)e=window.event;
    var target=e.target?e.target:e.srcElement;
    while(target&&target.className!='message-link')target=target.parentNode;
    if(!target||target.className!='message-link')return;
    if(target.pinned){/*Selected='';*/return false;}
    msgId=target.name;
  }
  CloseMsg(Selected)
  if(Selected==msgId) Selected='';
  else { OpenMsg(msgId, false); Selected=msgId;}
  if (e){if(e.preventDefault)e.preventDefault;else e.returnValue=false;}
    if(switchCallback)switchCallback(null, msgId)
  return false;
}


//]]>
</script>

	
<script type="text/javascript">
  var _comscore = _comscore || [];
  _comscore.push({ c1: "2", c2: "13507173" });
  (function() {
	var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true;
	s.src = (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js";
	el.parentNode.insertBefore(s, el);
  })();
</script>
<noscript>
  <img src="http://b.scorecardresearch.com/p?c1=2&c2=13507173&cv=2.0&cj=1" id="ctl00_Auditing_ComScore" />
</noscript>



<script type="text/javascript">
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-1735123-1']);
	_gaq.push(['_trackPageview']);
	_gaq.push(['_setDomainName', 'www.codeproject.com']);
	_gaq.push(['_setSessionTimeout', '1200']); 

	(function () {
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
	})(); 
</script>


</head>	

<body class="chrome chrome12">




<a href="#Main"><img alt="Click here to Skip to main content" class="access-link" src="/Images/t.gif" /></a>


<div class="page-background">
	<div id="A" class="container-content">

		
		<div id="ctl00_Suggest" class="suggestions">
		
<div class="alert-bar " style="display: none;">
	<a href="#" class="close-notify">×</a>
	<div><b>Not quite what you are looking for? You may want to try:</b><ul class="see-also"><li><a href="/KB/cs/ServiceController.aspx?q=ServiceControl">A ServiceController Class that Contains the Path to the Executable</a></li><li><a href="/KB/system/Svc_Controller_in_C_Sharp.aspx?q=ServiceControl">Using the ServiceController in C# to stop and start a service</a></li></ul><div id="removeHilite" class="alert-bar-command">
<a href="#" onclick="unmarkText('contentdiv','removeHilite')">highlights off</a>
</div>
</div>
</div>
		</div>

		

		
		

<div class="container nav-memberbar clearfix">
	<div class="member-stats float-left">8,874,771 members and growing! (52,371 online)</div>
	<div class="float-left"></div>

	<div class="float-right">
		&nbsp;&nbsp;
	</div>

	<div class="float-right">
		

<span class="tooltip member-message">
	<img src="/images/envelope11.gif" width="11px" height="11px" 
		style="vertical-align:bottom;padding-bottom:3px"/>
	<div class="tooltip-flyout small-text">
		
		<div id="ctl00_MemberMenu_Messages_Confirm"><a id="ctl00_MemberMenu_Messages_EmailConfirm" href="/script/Membership/SendConfirmRequest.aspx?rp=%2fArticles%2f2944%2fWindows-Services-information-component">Your email address needs to be confirmed.</a></div>
	</div>
</span><span id="ctl00_MemberMenu_CurRat" class="tooltip">
				<a id="ctl00_MemberMenu_MyProfile" href="/script/Membership/View.aspx?mid=8126139">quwenchao</a><img src="/Images/arrow-down-16.png" 
					style="width:16px;height:16px;vertical-align:bottom" />
				<div class="tooltip-flyout" style="width:110px !important">
					<div><a id="ctl00_MemberMenu_MySettingsNonSSL" href="http://www.codeproject.com/script/Membership/Modify.aspx">My Settings</a></div>
					<div><a id="ctl00_MemberMenu_MySettings" href="https://www.codeproject.com/script/Membership/Modify.aspx"><img src="/images/secure.png" width="13px" height="14px"  style="vertical-align:middle;border:0">My Settings (SSL)</a></div>
					<div><a id="ctl00_MemberMenu_MyContacts" href="/script/Membership/ListContacts.aspx">My Contact info</a></div>
					<div><a id="ctl00_MemberMenu_MyBookmarks" href="/script/Bookmarks/List.aspx?obtid=2">My Bookmarks</a></div>
					
					<div><a id="ctl00_MemberMenu_MyCodeProject" href="/script/Membership/MyWatchedItems.aspx">My Watched Items</a></div>
					<div><a id="ctl00_MemberMenu_MyArticles" href="/script/Articles/MemberArticles.aspx?amid=8126139">My Articles</a></div>
					<div><a id="ctl00_MemberMenu_MyMessages" href="/script/Forums/Messages.aspx?fmid=8126139">My Messages</a></div>
					<div><a id="ctl00_MemberMenu_MyQuestions" href="/script/Answers/MemberPosts.aspx?tab=questions&amp;mid=8126139&amp;showall=True">My Questions</a></div>
					<div><a id="ctl00_MemberMenu_MyAnswers" href="/script/Answers/MemberPosts.aspx?tab=answers&amp;mid=8126139&amp;showall=True">My Answers</a></div>
					<div><a id="ctl00_MemberMenu_MyComments" href="/script/comments/MemberComments.aspx?mid=8126139">My Comments</a></div>
					
				</div>
			</span><span id="ctl00_MemberMenu_TotalPoints" title="Total reputation points 965" class="member-rep-box silver" style="margin-left:0"><a href="/script/Reputation/List.aspx?mid=8126139">965</a></span>
			&nbsp;
			<a id="ctl00_MemberMenu_Signout" href="/script/Membership/LogOff.aspx?rp=%2fArticles%2f2944%2fWindows-Services-information-component">Sign out</a>

		
	</div>
</div>
		

		
		<table width="100%" cellspacing="0" cellpadding="0" border="0">
		<tr>
			<td class="page-header"><a href="/"><img id="ctl00_Logo" title="The Code Project" src="http://s.codeproject.com/App_Themes/Std/Img/logo225x90.gif" alt="Home" style="border-width:0px;" /></a></td>
			<td class="page-header" align="right">
				<div class="lqm_ad" lqm_publisher="lqm.codeproject.site"  lqm_zone="ros" lqm_format="728x90" lqm_tags='.NET1.0, C#, Windows, Visual-Studio, Dev, Intermediate,rating3'></div>
			</td>
		</tr></table>

		<table cellpadding="0" cellspacing="0" class="contrast1-background extended"><tr><td nowrap="nowrap">
			

<div class="navbar clearfix">
<ul id="nav" class="openable">

<li><a id="ctl00_TopNavBar_Home" class="down" href="http://www.codeproject.com">Home</a>


<li><a id="ctl00_TopNavBar_Art" class="down selected" href="/script/Articles/Latest.aspx">Articles</a>

	<ul class="openable">
		<li><a id="ctl00_TopNavBar_ArtTopicList" class="fly last" onmouseover="navBarMenu.ShowMap(this, &#39;siteMap&#39;);" href="/script/Content/SiteMap.aspx">Chapters and Sections<span class="fly-menu">&gt;</span></a><ul id="ctl00_TopNavBar_MapFlyout" class="openable"><li>
				<div id="siteMap" class="tooltip-flyout">
					<img src="/images/animated.gif" style="margin:150px;width:100px;height:100px;" />
				</div>
			</li></ul>
		</li>
		<li><a id="ctl00_TopNavBar_ArtSearch" class="fly break" href="/search.aspx">Search</a></li>
		<li><a id="ctl00_TopNavBar_ArtLatestArts" class="fly" href="/script/Articles/Latest.aspx?at=1,3,7">Latest Articles</a></li>
		<li><a id="ctl00_TopNavBar_ArtLatestTips" class="fly" href="/script/Articles/Latest.aspx?at=6">Latest Tips/Tricks</a></li>
		<li><a id="ctl00_TopNavBar_ArtTop" class="fly" href="/script/Articles/TopArticles.aspx?ta_so=5">Top Articles</a></li>
		<li><a id="ctl00_TopNavBar_ArtBeginner" class="fly" href="/search.aspx?aidlst=152&amp;sa_us=True">Beginner Articles</a></li>
		<li id="ctl00_TopNavBar_VideosLink">
			<a id="ctl00_TopNavBar_ArtVideoArticles" class="fly" href="/script/Articles/VideoArticleList.aspx">Video Articles</a>
		</li>
		<li><a id="ctl00_TopNavBar_ArtBlogArticles" class="fly break" href="/script/Articles/BlogArticleList.aspx">Technical Blogs</a></li>
		<li><a id="ctl00_TopNavBar_ArtPostArticle" class="fly" href="/script/Articles/Submit.aspx">Submit an Article or Tip</a></li>
		<li><a id="ctl00_TopNavBar_ArtPostBlog" class="fly break" href="/script/Articles/BlogFeed.aspx">Post your Blog</a></li>
		<li><a id="ctl00_TopNavBar_ArtGuide" class="fly" href="/info/Submit.aspx">Posting/Update Guidelines</a></li>
		<li><a id="ctl00_TopNavBar_ArtCompetition" class="fly last" href="/script/Awards/CurrentCompetitions.aspx?cmpTpId=1">Article Competition</a></li>
	</ul>

</li>



<li><a id="ctl00_TopNavBar_Answers" href="/script/Answers/List.aspx?tab=active">Quick Answers</a>
	<ul class="openable">
		<li id="ctl00_TopNavBar_AQL"><a id="ctl00_TopNavBar_ArticleQuestion" class="fly highlight" href="#_comments">Ask a Question about this article</a></li>

		<li><a id="ctl00_TopNavBar_QAAsk" class="fly" href="/Questions/ask.aspx">Ask a Question</a></li>

		
		<li><a id="ctl00_TopNavBar_QAUnanswered" class="fly" href="/script/Answers/List.aspx?tab=unanswered">View Unanswered Questions</a></li>
		<li><a id="ctl00_TopNavBar_QALatest" class="fly" href="/script/Answers/List.aspx?tab=active">View All Questions...</a></li>
		
				<li><a id="ctl00_TopNavBar_QATR_ctl00_Tag" class="fly" href="/script/Answers/List.aspx?tab=active&amp;alltags=true&amp;tags=81" style="padding-left:30px">C# questions</a></li>
			
				<li><a id="ctl00_TopNavBar_QATR_ctl01_Tag" class="fly" href="/script/Answers/List.aspx?tab=active&amp;alltags=true&amp;tags=85" style="padding-left:30px">ASP.NET questions</a></li>
			
				<li><a id="ctl00_TopNavBar_QATR_ctl02_Tag" class="fly" href="/script/Answers/List.aspx?tab=active&amp;alltags=true&amp;tags=842" style="padding-left:30px">VB.NET questions</a></li>
			
				<li><a id="ctl00_TopNavBar_QATR_ctl03_Tag" class="fly" href="/script/Answers/List.aspx?tab=active&amp;alltags=true&amp;tags=78" style="padding-left:30px">C++ questions</a></li>
			
				<li><a id="ctl00_TopNavBar_QATR_ctl04_Tag" class="fly" href="/script/Answers/List.aspx?tab=active&amp;alltags=true&amp;tags=308" style="padding-left:30px">C#4.0 questions</a></li>
			
	</ul>

</li>



<li><a id="ctl00_TopNavBar_Forums" href="/script/Forums/List.aspx">Discussions</a>

	<ul class="openable">
		<li><a id="ctl00_TopNavBar_MessageBoardsAll" class="fly" href="/script/Forums/List.aspx">All Message Boards...</a></li>
		<li><a class="fly" style="padding-left:30px" href="/Forums/1580997/Application-Lifecycle.aspx">Application Lifecycle<span class="fly-menu">&gt;</span></a>
<ul class="openable"><li><a class="fly" href="/Forums/1533717/Running-a-Business.aspx">Running a Business</a></li>
<li><a class="fly" href="/Forums/1533716/Sales-Marketing.aspx">Sales / Marketing</a></li>
<li><a class="fly" href="/Forums/1651/Collaboration-Beta-Testing.aspx">Collaboration / Beta Testing</a></li>
<li><a class="fly" href="/Forums/3304/Work-Training-Issues.aspx">Work &amp; Training Issues</a></li>
</ul></li>
<li><a class="fly" style="padding-left:30px" href="/Forums/369270/Design-and-Architecture.aspx">Design and Architecture</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/12076/ASP-NET.aspx">ASP.NET</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1580226/JavaScript.aspx">JavaScript</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1647/C-Cplusplus-MFC.aspx">C / C++ / MFC<span class="fly-menu">&gt;</span></a>
<ul class="openable"><li><a class="fly" href="/Forums/4486/ATL-WTL-STL.aspx">ATL /  WTL / STL</a></li>
<li><a class="fly" href="/Forums/3785/Managed-Cplusplus-CLI.aspx">Managed C++/CLI</a></li>
</ul></li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1649/Csharp.aspx">C#</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1627782/Free-Tools.aspx">Free Tools</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1725/Database.aspx">Database</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/186301/Hardware-Devices.aspx">Hardware &amp; Devices<span class="fly-menu">&gt;</span></a>
<ul class="openable"><li><a class="fly" href="/Forums/1644/System-Admin.aspx">System Admin</a></li>
</ul></li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1606152/Hosting-and-Servers.aspx">Hosting and Servers</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1643/Java.aspx">Java</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1650/NET-Framework.aspx">.NET Framework</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/13695/Mobile.aspx">Mobile</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1653293/VS-11-NET-4-5.aspx">VS 11 &amp; .NET 4.5</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1540733/Sharepoint.aspx">Sharepoint</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1004257/Silverlight-WPF.aspx">Silverlight / WPF</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1646/Visual-Basic.aspx">Visual Basic</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1640/Web-Development.aspx">Web Development</a>
</li>
<li><a class="fly" style="padding-left:30px" href="/Forums/1645/Site-Bugs-Suggestions.aspx">Site Bugs / Suggestions</a>
</li>

		<li class="heading">Other Languages<span class="fly-menu">&gt;</span>
		<ul class="openable">
		<li><a class="fly" href="/Forums/1580229/Hindi.aspx">General Indian Topics</a></li>
		<li><a class="fly" href="/Forums/1580230/Chinese.aspx">General Chinese Topics</a></li>
		</ul>
		</li>
		
	</ul>

</li>

<li><a id="ctl00_TopNavBar_Zones" href="/Zones/index.aspx">Zones</a>

	<ul class="openable">
		<!--<li class="heading">Zones</li>-->
		<li><a href="/Zones/Commerce/" class="fly">The Commerce Zone</a></li><li><a href="/Zones/Mobile/" class="fly">The Mobile & App Zone</a></li><li><a href="/Zones/Cloud/" class="fly">The Cloud Zone</a></li><li><a href="/Zones/Hardware/" class="fly">The Hardware Zone</a></li><li><a href="/Zones/Parallelism/" class="fly">The Parallelism Zone</a></li><li><a href="/Zones/WPF-Silverlight/" class="fly">The WPF / Silverlight Zone</a></li><li><a href="/Zones/Flex-Flash/" class="fly">The Flex / Flash Zone</a></li><li><a href="/Zones/HTML-CSS/" class="fly">The HTML5 / CSS3 Zone</a></li><li><a href="/Zones/SharePoint/" class="fly">SharePoint Zone</a></li><li><a href="/Zones/SqlServer/" class="fly">The SQL Zone</a></li><li><a href="/Zones/WhitePapers/" class="fly break">WhitePapers / Webcasts</a></li>
		<li><a id="ctl00_TopNavBar_Solutions" class="fly last" href="/KB/solution-center/">Solutions Center</a></li>
	</ul>

</li>










<li><a id="ctl00_TopNavBar_Features" href="/Feature/">Features</a>

	<ul class="openable">
		<li><a id="ctl00_TopNavBar_WhosWho" class="fly" href="/script/Membership/Profiles.aspx">Who's Who</a></li>
		<li><a id="ctl00_TopNavBar_MVPs" class="fly" href="/script/Awards/MVPWinners.aspx">Most Valuable Professionals</a></li>
		<li><a id="ctl00_TopNavBar_Companies" class="fly break" href="/script/Membership/Profiles.aspx?mgtid=1&amp;mgm=True">Company Listings</a></li>
		<li><a id="ctl00_TopNavBar_Catalog" class="fly" href="/script/Catalog/List.aspx">Component & Service Catalog</a></li>
		<li><a id="ctl00_TopNavBar_Comps" class="fly" href="/script/Awards/CurrentCompetitions.aspx?cmpTpId=1&amp;awsac=true">Competitions</a></li>
		<li><a id="ctl00_TopNavBar_News" class="fly" href="/script/News/List.aspx">News</a></li>
		<li></li>
		<li><a id="ctl00_TopNavBar_Insider" class="fly" href="/Feature/Insider/">The Insider Newsletter</a></li>
		<li><a id="ctl00_TopNavBar_Newsletters" class="fly" href="/script/Mailouts/Archive.aspx?mtpid=1">Newsletter archive</a></li>
		<li><a id="ctl00_TopNavBar_PressRelease" class="fly" href="/script/PressReleases/Preview.aspx">Press Releases</a></li>
		<li><a id="ctl00_TopNavBar_Surveys" class="fly" href="/script/Surveys/List.aspx">Surveys</a></li>
		<li><a id="ctl00_TopNavBar_Stuff" class="fly last" href="/Info/Stuff.aspx">CodeProject Stuff</a></li>
		<li></li>
	</ul>

</li>


<li><a id="ctl00_TopNavBar_Help" href="/KB/FAQs/">Help!</a>

	<ul class="openable">
		<li><a id="ctl00_TopNavBar_HelpWhatIs" class="fly" href="/info/guide.aspx">What is 'The Code Project'?</a></li>
		<li><a id="ctl00_TopNavBar_HelpGeneral" class="fly" href="/KB/FAQs/">General FAQ</a></li>
		<li><a id="ctl00_TopNavBar_HelpPostQuestion" class="fly" href="/Questions/ask.aspx">Post a Question</a></li>
		<li><a id="ctl00_TopNavBar_HelpBugs" class="fly" href="/Forums/1645/Site-Bugs-Suggestions.aspx">Bugs and Suggestions</a></li>
		<li><a id="ctl00_TopNavBar_HelpSiteMap" class="fly" href="/script/Content/SiteMap.aspx">Site Map</a></li>
		<li><a id="ctl00_TopNavBar_HelpAdvertise" class="fly" href="http://lakequincy.com/">Advertise with us</a></li>
		<li><a id="ctl00_TopNavBar_HelpAboutUs" class="fly last" href="/info/about.aspx">About Us</a></li>
	</ul>

</li>


<li style="margin-left:10px">
<a id="ctl00_TopNavBar_Lounge" class="simple" href="/Lounge.aspx">The Lounge</a>

	<ul class="openable">
		<li><a id="ctl00_TopNavBar_InsiderLnk" class="fly" href="/Insider.aspx">The Insider News</a></li>
		<li><a id="ctl00_TopNavBar_LoungeLnk" class="fly" href="/Lounge.aspx">The Lounge  </a></li>
		<li><a id="ctl00_TopNavBar_CleverLnk" class="fly" href="/Feature/CleverCode.aspx">Clever Code</a></li>
		<li><a id="ctl00_TopNavBar_ShameLnk" class="fly" href="/Feature/HallOfShame.aspx">Hall of Shame</a></li>
		<li><a id="ctl00_TopNavBar_SoapBoxLnk" class="fly" href="/Forums/1536756/The-Soapbox.aspx">The Soapbox</a></li>
	</ul>

</li>

</ul>

</div>

		</td><td align="right">
			

<div class="search-bar">

<form method="get" action="/search.aspx" name="Search" class="tight">


<table border="0" cellspacing="0" cellpadding="0" class="search"><tr><td><input TabIndex="2" class="search highlight" id="sb_tb" value="ServiceControl" name="q" /></td><td><input type="image" src="/images/search.gif" /></td></tr></table>

<div class="hover-container">
	<div id="SearchFilter" class="search-advanced popup small-text align-left">
	<b>Search within:<br /></b>
		
		<input type="radio" id="sb_kw" name="sbo" value="kw" checked="true"><label for="sb_kw">Articles</label><br>
<input type="radio" id="sb_qa" name="sbo" value="qa"><label for="sb_qa">Quick Answers</label><br>
<input type="radio" id="sb_fm" name="sbo" value="fm"><label for="sb_fm">Messages</label><br>
<input type="radio" id="sb_ctlk" name="sbo" value="ctlk"><label for="sb_ctlk">Product Catalog</label><br>


		
		
	</div>
</div>
</form>

</div>
		</td></tr></table>
		

		
		<div class="container-article hreview-aggregate"> 
		
			
			<div class="container-header">
				<div id="ctl00_Header" class="header">

					<a name="Main"></a>

					
					<a name="_articleTop" id="_articleTop"></a>
					

<div class="clearfix hover-container">

	
	<div class="float-right action-links"> 
		<span id="SBI"><img src="http://s.codeproject.com/images/share_drop24.png" id="ctl00_TitleArea_ActionLinks_AddTo_Img" width="37" height="24" alt="add" style="vertical-align:middle" />
</span>
<div id="ATD" class="list-socialbookmark"></div> 
 

<span class="tooltip">
	<a id="ctl00_TitleArea_ActionLinks_ArticleBmk_ImgBt" title="Bookmark" AlternateText="Bookmark" name="bm_2944_2" onclick="return bookmarkMe(2944,2,&#39;/script/Bookmarks/Ajax/Add.aspx?obid=2944&amp;obtid=2&amp;action=AddBookmark&amp;bio=true&#39;,true);" href="/script/Bookmarks/Add.aspx?obid=2944&amp;obtid=2&amp;action=AddBookmark&amp;bio=true" style="display:inline-block;height:24px;width:24px;vertical-align:middle;"><img title="Bookmark" src="http://s.codeproject.com/script/Bookmarks/Images/bookmark.png" alt="" style="border-width:0px;" /></a>


<span id="ctl00_TitleArea_ActionLinks_ArticleBmk_StatusMsg" class="tiny-text" style="display:none" name="bm_2944_2"></span>
 
	<div class="speech-bubble-container-up">
		<div class="speech-bubble-up">Add to your CodeProject bookmarks</div>
		<div class="speech-bubble-pointer-up">
			<div class="speech-bubble-pointer-up-inner"></div>
		</div>
	</div>
</span>


<a id="ctl00_TitleArea_ActionLinks_PrintLnk" class="tooltip" href="/Articles/2944/Windows-Services-information-component?display=Print">
	<img src="http://s.codeproject.com/script/Content/Images/print.gif" 
		width="24px" height="24px" style="vertical-align:middle;border:0">
	<div class="speech-bubble-container-up">
		<div class="speech-bubble-up">Print Article</div>
		<div class="speech-bubble-pointer-up">
			<div class="speech-bubble-pointer-up-inner"></div>
		</div>
	</div>
</a>
	</div>

	<div class="container">
		
		<div class="breadcrumb float-left"><a href="/script/Content/SiteMap.aspx"><span class="sitemap-anchor" onmouseover="navBarMenu.ShowMap(this,'map');"><img width="16px" height="16px" src="/images/sitemap16.png" border="0" alt="Site map" style="vertical-align:middle" /><div id="map" class="tooltip-flyout"><img src="/images/animated.gif" style="margin:150px;width:100px;height:100px;border:0;" /></div></span></a> &#187; <a href="/Chapters/5/Languages.aspx">Languages</a> &#187; <a href="/KB/cs/">C#</a> &#187; <a href="/KB/cs/#General">General</a></div>
	</div>

	
	<div id="ctl00_TitleArea_InfoArea" class="float-right pad-top">
		

<div class="infobox">
	<table class="tight small-text" cellpadding="0" cellspacing="1">
	<tr><td>Licence&nbsp;</td><td></td></tr>
	
	<tr><td>First Posted&nbsp;</td><td nowrap="nowrap"><b>25 Sep 2002</b></td></tr>
	<tr><td>Views&nbsp;</td><td><b>70,737</b></td></tr>
		
	
	<tr><td>Bookmarked&nbsp;</td><td><b>27 times</b></td></tr>
	

	
	
	</table>
</div>	
	</div>

	
	<div class="item">
	<h1 id="ctl00_TitleArea_ArticleTitle" class="fn">Windows Services information component</h1> 
	</div>

	
	<div class="author">
		By <b><a rel="author" href="/script/Membership/View.aspx?mid=36480">Chandra Hundigam</a></b> | 
		25 Sep 2002 
		
		| <a id="ctl00_TitleArea_ArticleInfoLink" href="/script/Articles/Types.aspx?#Article">Article</a>

		
		
	</div>
	
	<div class="tags">
	<span id="ctl00_TitleArea_TagsList_TagWrp" class="tags">
	
	
	
	<span id="ctl00_TitleArea_TagsList_VisibleTags"><span class="t"><a rel="tag" href="/Tags/.NET1.0">.NET1.0</a></span><span class="t"><a rel="tag" href="/Tags/C%23">C#</a></span><span class="t"><a rel="tag" href="/Tags/Windows">Windows</a></span><span class="t"><a rel="tag" href="/Tags/Visual-Studio">Visual-Studio</a></span><span class="t"><a rel="tag" href="/Tags/Dev">Dev</a></span><span class="t"><a rel="tag" href="/Tags/Intermediate">Intermediate</a></span></span> 

	
	
</span>

	</div>

	
	<div class="abstract summary"><span id="ctl00_TitleArea_ArticleDescr">An article on a Windows Services component</span></div>
</div>



					

				</div>

				<div id="ctl00_HeadSide" class="header-sidebar">
					<div class="align-left" style="height:24px">
						


&nbsp;










					</div>

					

<div class="bold pad-top">See Also</div>
<ul class="outdent small-text" style="margin-left:5px">
	<li><a id="ctl00_SeeAlso_LikeThis" href="/search.aspx?q=Windows+Services+information+component">More like this</a></li>
	<li><a id="ctl00_SeeAlso_ByAuthor" href="/script/Articles/MemberArticles.aspx?amid=36480">More by this author</a></li>
</ul>

				</div>

			</div>
			

			
			<div id="ctl00_Nav" class="container-nav">
				<div id="ctl00_TabContainer" class="tabs-container clearfix">

					<div class="float-left">
						
						

<div class="tabs float-left"><table cellpadding="0" cellspacing="0"><tr>
	<td class="tab-selected">Article</td><td class="tab-unselected"><a href="/script/Articles/ViewDownloads.aspx?aid=2944">Browse Code</a></td><td class="tab-unselected"><a href="/script/Articles/Statistics.aspx?aid=2944">Stats</a></td><td class="tab-unselected"><a href="/script/Articles/ListVersions.aspx?aid=2944">Revisions</a></td><td class="tab-unselected"><a href="/script/Articles/ListAlternatives.aspx?aid=2944">Alternatives</a></td>
</tr></table></div>	


						
						<div class="float-left" style="margin-left:15px">
							<div id="ctl00_CurRat" class="tooltip anchorLink" style="cursor:pointer" onclick="scrollToAnchor(&#39;#_rating&#39;);" name="CurRat_2944">
								

<table cellpadding="0" cellspacing="0" class="small-text">
<tr>
	
	<td class="nowrap">

		<span id="ctl00_ArticleRating_VI">
		<div class="nowrap rating-stars" style="height:24px;width:120px;position:relative;">
	<div class="clipped align-left float-left" style="height:24px;width:91px;">
		<img src="http://s.codeproject.com/script/Ratings/Images/stars-fill.png" style="border-width:0px;" />
	</div><div class="clipped" style="height:24px;width:29px;position:relative;">
		<img src="http://s.codeproject.com/script/Ratings/Images/stars-empty.png" style="border-width:0px;position:absolute;top:0;right:0;" />
	</div>
</div>
		</span>

		
	</td>
	
	<td id="ctl00_ArticleRating_VR" class="nowrap">
		&nbsp;
		<span id="ctl00_ArticleRating_VotesR">&nbsp;<span class="rating">3.80</span> (<span class="count">5 votes</span>)</span>
		
	</td>

</tr>

</table>

								<div id="ctl00_RB" class="speech-bubble-container-up">
									<div class="speech-bubble-up" style="width:150px !important">
										            
<div>
<table class="feature" width="100%" height="50px" title="Voting Distribution. Recent data only" cellpadding="0" cellspacing="0"><tr><td class="chart-column"><img src="/script/Ratings/Images/pollcol.gif" width="20pxpx" height="25px" border="0px" alt="1 vote, 25.0%" title="1 vote, 25.0%" /><br /><span title="1 vote">1</span></td>
<td class="chart-column"><img src="http://s.codeproject.com/Images/t.gif" width="20pxpx" height="1px" border="0px" alt="" title="" /><br /><span title="0 votes">2</span></td>
<td class="chart-column"><img src="http://s.codeproject.com/Images/t.gif" width="20pxpx" height="1px" border="0px" alt="" title="" /><br /><span title="0 votes">3</span></td>
<td class="chart-column"><img src="/script/Ratings/Images/pollcol.gif" width="20pxpx" height="50px" border="0px" alt="2 votes, 50.0%" title="2 votes, 50.0%" /><br /><span title="2 votes">4</span></td>
<td class="chart-column"><img src="/script/Ratings/Images/pollcol.gif" width="20pxpx" height="25px" border="0px" alt="1 vote, 25.0%" title="1 vote, 25.0%" /><br /><span title="1 vote">5</span></td>
</tr></table><div class="small-text align-center">3.80/5 - 5 votes</div><div class="small-text align-center subdue">μ 3.80, σ<sub>a</sub> 3.03 [<a href="/KB/FAQs/RatingReputationFAQ.aspx#noisefilter">?</a>]</div>
</div>
									</div>
									<div class="speech-bubble-pointer-up">
										<div class="speech-bubble-pointer-up-inner"></div>
									</div>
								</div>
							</div>
						</div>

						<div class="float-left">
							&nbsp; 
							<a id="discussAnch" href="#_comments" class="tooltip anchorLink">
							<img src="http://s.codeproject.com/script/Content/Images/discuss.gif" 
								width="24px" height="24px" alt="Discuss" style="vertical-align:middle;border:0" />
								<div class="speech-bubble-container-up">
									<div class="speech-bubble-up">Discuss this article</div>
									<div class="speech-bubble-pointer-up">
										<div class="speech-bubble-pointer-up-inner"></div>
									</div>
								</div>
							</a>
							<span id="ctl00_CmtCnt" class="subdue small-text align-middle" style="margin-left:-4px">5</span>

							&nbsp; <span id="ctl00_ReportItem_StatusMsg" class="tiny-text" style="display:none"></span>


<span id="ctl00_ReportItem_CurRpt" class="tooltip">	
		<img id="ctl00_ReportItem_MenuImage" alt="report" src="http://s.codeproject.com/script/Content/Images/report.gif" style="border-width:0px;vertical-align:middle" />
		
		<div class="tooltip-flyout" style="width:220px !important" onmouseover="CheckForUndo(this);">
			<div id="ctl00_ReportItem_CommentDiv" class="small-text">
			<b>Comments?</b><br />
				<input name="ctl00$ReportItem$Comments" type="text" id="ctl00_ReportItem_Comments" class="report-comment" />
			</div>
			 
			
					<div id="ctl00_ReportItem_ReportingTypeHeaders_ctl00_Header" class="report-header">Report</div>
					
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl00_ReportingTypes_ctl00_Link" name="rpt_2944_2_1" onclick="return ReportMe(2944,2,1,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=1&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=1">Unclear or Incomplete</a>
							</div>
						 
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl00_ReportingTypes_ctl01_Link" name="rpt_2944_2_10" onclick="return ReportMe(2944,2,10,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=10&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=10">Extremely poor quality</a>
							</div>
						 
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl00_ReportingTypes_ctl02_Link" name="rpt_2944_2_4" onclick="return ReportMe(2944,2,4,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=4&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=4">Off-topic</a>
							</div>
						 
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl00_ReportingTypes_ctl03_Link" name="rpt_2944_2_5" onclick="return ReportMe(2944,2,5,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=5&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=5">Spam/abusive</a>
							</div>
						 
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl00_ReportingTypes_ctl04_Link" name="rpt_2944_2_11" onclick="return ReportMe(2944,2,11,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=11&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=11">Plagiarized</a>
							</div>
						 
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl00_ReportingTypes_ctl05_Link" name="rpt_2944_2_12" onclick="return ReportMe(2944,2,12,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=12&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=12">Inaccurate / Misleading</a>
							</div>
						 
			   
					<div id="ctl00_ReportItem_ReportingTypeHeaders_ctl01_Header" class="report-header">Needs help</div>
					
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl01_ReportingTypes_ctl00_Link" name="rpt_2944_2_14" onclick="return ReportMe(2944,2,14,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=14&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=14">Format / layout issues</a>
							</div>
						 
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl01_ReportingTypes_ctl01_Link" name="rpt_2944_2_15" onclick="return ReportMe(2944,2,15,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=15&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=15">Wrong section / tags</a>
							</div>
						 
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl01_ReportingTypes_ctl02_Link" name="rpt_2944_2_16" onclick="return ReportMe(2944,2,16,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=16&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=16">Wrong type (tip, blog, article)</a>
							</div>
						 
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl01_ReportingTypes_ctl03_Link" name="rpt_2944_2_17" onclick="return ReportMe(2944,2,17,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=17&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=17">Missing images/downloads</a>
							</div>
						 
							<div class="report-prompt nowrap">
								
								<a id="ctl00_ReportItem_ReportingTypeHeaders_ctl01_ReportingTypes_ctl04_Link" name="rpt_2944_2_18" onclick="return ReportMe(2944,2,18,&#39;/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=18&amp;ajax=True&#39;,false,&#39;ctl00_ReportItem_Comments&#39;);" href="/script/Content/Report.aspx?obtid=2&amp;obid=2944&amp;obstid=1&amp;ovid=1&amp;rid=18">Images/downloads are offsite</a>
							</div>
						 
			   

			<div class="Undo"></div>
		</div>
	</span>



							   
						</div>

					</div>

				</div>

				
			</div>
			

			
			<div class="container-text">

				<div id="AT" class="text">
					
					
					
					

						
							
			
					<div id="ctl00_confirmError" class="callout small-text" style="padding:10px;margin:20px;"><img style="float:left;margin-right:10px" 
					src="/images/warning_32.png" width="32px" height="32px" /><b>Is your email address OK?</b>
					You are signed up for our newsletters but your email address is either unconfirmed, or has not 
					been reconfirmed in a long time. Please click 
					<a id="ctl00_RequestConfirmLink2" href="/script/Membership/SendConfirmRequest.aspx?rp=%2fArticles%2f2944%2fWindows-Services-information-component">here</a> to have a 
					confirmation email sent so we can confirm your email address and start sending you newsletters 
					again. Alternatively, you can 
					<a id="ctl00_SubscribeLink2" href="/script/Membership/Subscribe.aspx?rp=%2fArticles%2f2944%2fWindows-Services-information-component">update your subscriptions</a>.</div><form name="aspnetForm" method="post" action="/Articles/2944/Windows-Services-information-component" id="aspnetForm" style="margin:0;padding:0">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMjExOTQzNjk4Mw9kFgJmD2QWAgIHD2QWCgIBDxYCHgdWaXNpYmxlZ2QCEQ9kFgICAQ9kFgZmDw8WAh4LTmF2aWdhdGVVcmwFMS9zY3JpcHQvQXJ0aWNsZXMvQWRtaW4vRWRpdG9yQ2hvaWNlLmFzcHg/YWlkPTI5NDRkZAICDw8WAh8BBTcvc2NyaXB0L0F3YXJkcy9BZG1pbi9Bd2FyZE9iamVjdC5hc3B4P29iaWQ9Mjk0NCZvYnRpZD0yZGQCCg8PFgIfAQUuL3NjcmlwdC9BcnRpY2xlcy9BZG1pbi9RdWV1ZUVkaXQuYXNweD9haWQ9Mjk0NGRkAhMPZBYCAgEPZBYCAgIPFgIeCWlubmVyaHRtbAUBNWQCFQ9kFgICCw9kFggCAQ8WAh8AZxYEAgEPDxYCHwEFaS9zY3JpcHQvTWVtYmVyc2hpcC9TZW5kQ29uZmlybVJlcXVlc3QuYXNweD9ycD0lMmZBcnRpY2xlcyUyZjI5NDQlMmZXaW5kb3dzLVNlcnZpY2VzLWluZm9ybWF0aW9uLWNvbXBvbmVudGRkAgMPDxYCHwEFYC9zY3JpcHQvTWVtYmVyc2hpcC9TdWJzY3JpYmUuYXNweD9ycD0lMmZBcnRpY2xlcyUyZjI5NDQlMmZXaW5kb3dzLVNlcnZpY2VzLWluZm9ybWF0aW9uLWNvbXBvbmVudGRkAgIPFgIeBmFjdGlvbgU1L0FydGljbGVzLzI5NDQvV2luZG93cy1TZXJ2aWNlcy1pbmZvcm1hdGlvbi1jb21wb25lbnQWCgIBDw8WBB8BBTUvc2NyaXB0L0FydGljbGVzL1N1Ym1pc3Npb25XaXphcmQuYXNweD9hdD0xJmFwaWQ9Mjk0NB8AZ2RkAgMPZBYCAgEPFgIfAGhkAgUPZBYCAgIPZBYCAgEPEGRkFgBkAgsPFgIeC18hSXRlbUNvdW50AgFkAg0PZBYCAgEPFgIeBFRleHQFbjxhIGNsYXNzPSJhbmNob3JMaW5rIiBocmVmPSIvQXJ0aWNsZXMvMjk0NC9XaW5kb3dzLVNlcnZpY2VzLWluZm9ybWF0aW9uLWNvbXBvbmVudCNfYXJ0aWNsZVRvcCI+QXJ0aWNsZSBUb3A8L2E+ZAIKDw8WBB8FBQlQZXJtYWxpbmsfAQU1L0FydGljbGVzLzI5NDQvV2luZG93cy1TZXJ2aWNlcy1pbmZvcm1hdGlvbi1jb21wb25lbnRkZAIZDxYCHwUFIkNvcHlyaWdodCAyMDAyIGJ5IENoYW5kcmEgSHVuZGlnYW1kAhcPZBYCAgUPDxYCHwBoZGRkweVkv0CSTJzm5iyx/+KVRWDsP6k=" />
</div>

<div>

	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWCQKJ6o+4BQKi6fqQCgLAlMXDBwLBlMXDBwLClMXDBwLDlMXDBwLElMXDBwLP+++tCwK5upDkC7ctDiO3tp+V9+oFX6o/tjQ/XnOc" />
</div>

						<a id="ctl00_AddAlternative" title="Write a related article about upgrades or translate this into a different language." class="button add-alternative float-right" href="/script/Articles/SubmissionWizard.aspx?at=1&amp;apid=2944">Add your own<br />alternative version</a>

						<!-- Article Text Start -->
						<div id="contentdiv">
						



<ul class=download> 
<li><a href="/KB/cs/CSServiceCompCP/Article_Src.zip">Download source - 4 Kb</a></li>
<li><a href="/KB/cs/CSServiceCompCP/Article_Demo.zip">Download  demo - 6 Kb</a>
</li>
</ul>

<p><img border="0" src="/KB/cs/CSServiceCompCP/Servic1.jpg" width="500" height="407"></p>

<h2>Introduction</h2>

<p>This article is on a reusable windows service information component, which 
queries &amp; retrieves the window’s service information. Service executables don’t 
have user interface and they run in the background for long periods. These 
services can be automatically started when the computer boots, can be paused and 
restarted. There are two kinds of services, which runs in windows. They are 
Device Driver services and Non Device Driver services. Apart from that the 
service can be a interactive service or non-interactive service. An interactive 
service is a service that can interact with the desktop.</p>

<p>In .NET framework library the <code lang=cs>System.ServiceProcess</code> namespace provides 
classes that allow you to implement, install, and control Windows service 
applications. To implement a service we need to inherit from <code lang=cs>ServiceBase</code> 
class. In this article we are not going to implement a service; but we are going to 
develop a component which will retrieve &amp; query the existing services. In order 
to proceed with this we will use <code lang=cs>ServiceController</code> class (alias 
<code lang=cs>System.ServiceProcess.ServiceController</code>). The <code lang=cs>ServiceController</code> class enables 
you to connect to an existing service and manipulate it or get information about 
it.</p>

<h2>Details</h2>

<p>So our component helps in administering the services running in the local system. The <code lang=cs>ServiceBase</code> class defines the processing, a service performs when 
a command occurs. The <code lang=cs>ServiceController</code> is the agent that enable us to call those commands 
on the services. So we are going to create a component which is derived from 
<code lang=cs>System.ComponentModel.Component, </code>the default implementation of <code lang=cs>IComponent</code>. 
<code lang=cs>IComponent</code> serves as the base class for all components in the common language 
runtime and <code lang=cs>IComponent</code> allows a component to keep track of design-time 
information, such as its container component or its name, or to access services 
that the designer may expose.</p>

<p> 
<code lang=cs>Component</code> class is remotable and derives from 
<code lang=cs>MarshalByRefObject</code> which enables access to objects across application domain 
boundaries in applications that support remoting.
Lets discuss first about <code lang=cs>ServiceInfo</code> component. <code lang=cs>ServiceInfo</code> Class is derived 
from <code lang=cs>Component</code> class of .NET framework and this component will have read/write 
properties for getting/setting the Service information. So I have selected  important methods of <code lang=cs>ServiceController</code> class methods to query the services. </p>

<table border="1">
  <tr>
    <td>

<p><b>Namespace</b> : <code lang=cs>ServiceInfoLib</code> </p>

<p><b>Class</b>: <code lang=cs>ServiceInfo</code> </p>

<p><b>Properties</b> :</p>

<ol>
  <li> <code lang=cs>DisplayType</code> (get/set property) </li>
</ol>

<p><b>Methods</b>: </p>

<ol>
  <li> <code lang=cs>GetNonDDServicesDetails() </code>(gets the Non Device 
  Driver Service Details) </li>
  <li> <code lang=cs>GetDDServicesDetails() </code>(gets the Device Driver 
  Service Details) </li>
  <li> <code lang=cs>GetNonDDServicesStatus()</code> (gets the Non Device Driver 
  Service Status) </li>
  <li> <code lang=cs>GetDDServicesStatus() </code>(gets the Device Driver 
  Service Status) </li>
  <li> <code lang=cs>FindService(string s)</code> (Checks whether service exists 
  or not) </li>
</ol>

</td>
  </tr>
</table>

<p>Most of the methods in <code lang=cs>ServiceInfo</code> component returns a <code lang=cs>string</code> array. Internally 
all the methods of the component will call the <code lang=cs>ServiceController</code> methods.</p>

<h2>Brief Description about the component methods</h2>

<ul>
  <li>The <code lang=cs>GetNonDDServiceDetails()</code> method of <code lang=cs>ServiceInfo</code> component returns a list of 
all the Non Device Driver Services installed on your local system. It internally 
calls the <code lang=cs>SystemController.GetServices()</code> method. It also uses the property called 
  <code lang=cs>DisplayType</code> in <code lang=cs>ServerInfo</code> component where the property get/set the display name 
of the service. If it is set to display type ‘D’ then it gives the list of 
friendly display Name of the Services and if its set to ‘S’ then it gives the 
list of Service Name of the Services; internally it calls the <code lang=cs>ServiceController</code> <code lang=cs>DisplayName</code> and <code lang=cs>ServiceName</code> properties. 
  </li>
  <li>The <code lang=cs>GetDDServiceDetails()</code> method of <code lang=cs>ServiceInfo</code> component returns a list of 
all the Device Driver Service installed on your local system. It internally 
calls the <code lang=cs>SystemController.GetDevices()  </code>method.</li>
  <li>The <code lang=cs>GetNonDDServiceStatus()</code> method of <code lang=cs>ServiceInfo</code> component returns a list of 
all the Non Device Driver Service installed on your local system and their 
status, which indicates whether the service is running, stopped, or paused, or 
whether a start, stop, pause, or continue command is pending. It internally 
calls the <code lang=cs>SystemController.GetServices()</code> method and <code lang=cs>ServiceController.Status</code> 
property which returns the <code lang=cs>ServiceControllerStatus</code> class which indicates the 
status. In the component, I used <code lang=cs>ResolveSrvStatus</code> method to resolve the exact 
status.</li>
  <li>The <code lang=cs>GetDDServiceStatus()</code> method of <code lang=cs>ServiceInfo</code> component returns a list of 
all the Device Driver Services installed on your local system and their&nbsp; status 
which indicates whether the service is running, stopped, or paused, or whether a 
start, stop, pause, or continue command is pending. It internally calls the <code lang=cs>SystemController.GetDevices()</code> method and <code lang=cs>ServiceController.Status </code>property which 
returns the <code lang=cs>ServiceControllerStatus</code> class which indicates the status. In the 
component I used <code lang=cs>ResolveSrvStatus</code> method to resolve the exact status.</li>
  <li>The <code lang=cs>FindService(string s)</code> method of <code lang=cs>ServiceInfo</code> component 
  is to check whether a 
particular service exists in the local machine or not; if its found it returns a 
  <code lang=cs>string</code> saying ‘Found’ and if that particular service does not 
  exist, then it returns 
‘Not Found’</li>
</ul>

<h2>Source Code</h2>

<pre lang=cs><span class="code-comment">//</span><span class="code-comment"> SrvInfoLib.cs 
</span><span class="code-comment">//</span><span class="code-comment"> ServiceInfo component code in c# 
</span><span class="code-keyword">using</span> System; 
<span class="code-keyword">using</span> System.ComponentModel; 
<span class="code-keyword">using</span> System.ServiceProcess ; 
<span class="code-keyword">namespace</span> ServiceInfoLib 
{ 
    <span class="code-SummaryComment">///</span><span class="code-comment"> <span class="code-SummaryComment">&lt;</span><span class="code-SummaryComment">summary</span><span class="code-SummaryComment">&gt;</span> 
</span>    <span class="code-SummaryComment">///</span><span class="code-comment"> ServiceInfo Class gets the windows service details. 
</span>    <span class="code-SummaryComment">///</span><span class="code-comment"> <span class="code-SummaryComment">&lt;</span><span class="code-SummaryComment">/</span><span class="code-SummaryComment">summary</span><span class="code-SummaryComment">&gt;</span> 
</span><span class="code-keyword">public</span> <span class="code-keyword">class</span> ServiceInfo: Component 
{ 

    <span class="code-keyword">private</span> <span class="code-keyword">static</span> <span class="code-keyword">char</span> cDTyp=<span class="code-string">'</span><span class="code-string">D'</span>; <span class="code-comment">//</span><span class="code-comment"> 'D' -&gt; Display Name 
</span>    <span class="code-comment">//</span><span class="code-comment"> 'S' -&gt; Service Name 
</span>
    <span class="code-keyword">public</span> <span class="code-keyword">char</span> DisplayType 
    { 
        <span class="code-keyword">set</span> 
        { 
            cDTyp=value; 
        } 
        <span class="code-keyword">get</span> 
        { 
            <span class="code-keyword">return</span> cDTyp; 
        } 
    } 
    <span class="code-keyword">public</span> ServiceInfo(){} 
    <span class="code-comment">//</span><span class="code-comment">Retrieves a list of Non Device Driver Services 
</span>    <span class="code-keyword">public</span>  <span class="code-keyword">string</span>[] GetNonDDServicesDetails() 
    { 

        <span class="code-keyword">string</span>[] s=null; 
        <span class="code-keyword">try</span> 
        { 

            ServiceController[] srvC=
                ServiceController.GetServices(); 
            s=new <span class="code-keyword">string</span>[srvC.Length]; 

            <span class="code-keyword">for</span>(<span class="code-keyword">int</span> i=0; i &lt; srvC.Length; i++) 
            { 
                <span class="code-keyword">if</span>(cDTyp==<span class="code-string">'</span><span class="code-string">D'</span>) 
                    s[i]=srvC[i].DisplayName; 
                <span class="code-keyword">else</span> <span class="code-keyword">if</span>(cDTyp==<span class="code-string">'</span><span class="code-string">S'</span>) 
                    s[i]=srvC[i].ServiceName; 
            } 
        }  
        <span class="code-keyword">catch</span>(Exception x){} 
        <span class="code-keyword">return</span> s;  
    } 

    <span class="code-comment">//</span><span class="code-comment">Retrieves a list of  Device Driver Services 
</span>    <span class="code-keyword">public</span>  <span class="code-keyword">string</span>[] GetDDServicesDetails() 
    { 

        <span class="code-keyword">string</span>[] s=null; 
        <span class="code-keyword">try</span> 
        { 

            ServiceController[] srvC=ServiceController.GetDevices(); 
            s=new <span class="code-keyword">string</span>[srvC.Length]; 
            <span class="code-keyword">for</span>(<span class="code-keyword">int</span> i=0; i &lt; srvC.Length;i++) 

            { 

                <span class="code-keyword">if</span>(cDTyp==<span class="code-string">'</span><span class="code-string">D'</span>) 
                    s[i]=srvC[i].DisplayName; 
                <span class="code-keyword">else</span> <span class="code-keyword">if</span>(cDTyp==<span class="code-string">'</span><span class="code-string">S'</span>) 
                    s[i]=srvC[i].ServiceName; 
            } 
        }  
        <span class="code-keyword">catch</span>(Exception x){} 
        <span class="code-keyword">return</span> s;         

    } 

    <span class="code-comment">//</span><span class="code-comment">Retrieves a list of Non Device Driver Services 
</span>    <span class="code-comment">//</span><span class="code-comment">and status 
</span>    <span class="code-keyword">public</span>  <span class="code-keyword">string</span>[] GetNonDDServicesStatus() 
    { 
        <span class="code-keyword">string</span>[] s=null; 
        <span class="code-keyword">try</span> 
        { 

            ServiceController[] srvC=ServiceController.GetServices();  
            s=new <span class="code-keyword">string</span>[srvC.Length]; 
            <span class="code-keyword">for</span>(<span class="code-keyword">int</span> i=0; i &lt; srvC.Length; i++) 
            { 
                <span class="code-keyword">if</span>(cDTyp==<span class="code-string">'</span><span class="code-string">D'</span>) 
                    s[i]=srvC[i].DisplayName + <span class="code-string">"</span><span class="code-string">\t-&gt;"</span> +
                    ResolveSrvStatus(srvC[i].Status); 
                <span class="code-keyword">else</span> <span class="code-keyword">if</span>(cDTyp==<span class="code-string">'</span><span class="code-string">S'</span>) 
                    s[i]=srvC[i].ServiceName + <span class="code-string">"</span><span class="code-string">\t-&gt;"</span> +
                    ResolveSrvStatus(srvC[i].Status); 
            } 
        }  
        <span class="code-keyword">catch</span>(Exception x){} 
        <span class="code-keyword">return</span> s;         

    } 

    <span class="code-comment">//</span><span class="code-comment">Retrieves a list of  Device Driver Services 
</span>    <span class="code-comment">//</span><span class="code-comment">and  status 
</span>    <span class="code-keyword">public</span>  <span class="code-keyword">string</span>[] GetDDServicesStatus() 
    { 
        <span class="code-keyword">string</span>[] s=null; 
        <span class="code-keyword">try</span> 
        { 

            ServiceController[] srvC=ServiceController.GetDevices();  
            s=new <span class="code-keyword">string</span>[srvC.Length]; 
            <span class="code-keyword">for</span>(<span class="code-keyword">int</span> i=0;i &lt; srvC.Length; i++) 
            { 
                <span class="code-keyword">if</span>(cDTyp==<span class="code-string">'</span><span class="code-string">D'</span>) 
                    s[i]=srvC[i].DisplayName+<span class="code-string">"</span><span class="code-string">\t-&gt;"</span> +
                    ResolveSrvStatus(srvC[i].Status); 
                <span class="code-keyword">else</span> <span class="code-keyword">if</span>(cDTyp==<span class="code-string">'</span><span class="code-string">S'</span>) 
                    s[i]=srvC[i].ServiceName+<span class="code-string">"</span><span class="code-string">\t-&gt;"</span> +
                    ResolveSrvStatus(srvC[i].Status); 
            } 
        }  
        <span class="code-keyword">catch</span>(Exception x){} 
        <span class="code-keyword">return</span> s; 
    } 
    <span class="code-comment">//</span><span class="code-comment">Checks for particular service exists or not 
</span>    <span class="code-keyword">public</span> <span class="code-keyword">string</span> FindService(<span class="code-keyword">string</span> s) 
    { 

        <span class="code-keyword">string</span> s3=null; 
        <span class="code-keyword">try</span> 
        { 

            ServiceController[] services; 
            services = ServiceController.GetServices(); 
            <span class="code-keyword">for</span>(<span class="code-keyword">int</span> i = <span class="code-digit">0</span>; i &lt;  services.Length; i++) 
            { 
                <span class="code-keyword">if</span>(services[i].ServiceName==s) 
                { 

                    s3=<span class="code-string">"</span><span class="code-string">Found"</span>; 
                    <span class="code-keyword">break</span>; 
                } 

            } 

        }  
        <span class="code-keyword">catch</span>(Exception x){} 
        <span class="code-keyword">if</span>(s3==null) 
            <span class="code-keyword">return</span> s3=<span class="code-string">"</span><span class="code-string">Not Found"</span>; 
        <span class="code-keyword">else</span> 
            <span class="code-keyword">return</span> s3;  
    } 
    <span class="code-keyword">private</span> <span class="code-keyword">string</span> ResolveSrvStatus(ServiceControllerStatus sl) 
    { 
        <span class="code-keyword">string</span> st=<span class="code-string">"</span><span class="code-string">"</span>; 
        <span class="code-keyword">if</span>(sl==ServiceControllerStatus.ContinuePending) 
            st=<span class="code-string">"</span><span class="code-string">The service continue is pending."</span>; 
        <span class="code-keyword">if</span>(sl==ServiceControllerStatus.Paused) 
            st=<span class="code-string">"</span><span class="code-string">The service is paused."</span>; 
        <span class="code-keyword">if</span>(sl==ServiceControllerStatus.PausePending) 
            st=<span class="code-string">"</span><span class="code-string">The service pause is pending."</span>; 
        <span class="code-keyword">if</span>(sl==ServiceControllerStatus.Running) 
            st=<span class="code-string">"</span><span class="code-string">The service is running."</span>; 
        <span class="code-keyword">if</span>(sl==ServiceControllerStatus.StartPending) 
            st=<span class="code-string">"</span><span class="code-string">The service is starting."</span>; 
        <span class="code-keyword">if</span>(sl==ServiceControllerStatus.Stopped) 
            st=<span class="code-string">"</span><span class="code-string">The service is stopped."</span>; 
        <span class="code-keyword">if</span>(sl==ServiceControllerStatus.StopPending) 
            st=<span class="code-string">"</span><span class="code-string">The service is not running."</span>; 
        <span class="code-keyword">return</span> st; 
    } 

} 

}</pre>

<p>
Compile the above as a component library to produce <i>ServiceInfoLib.dll</i> 
and then one 
can call this component in different clients like Windows Forms, Web Forms or Console 
applications. I have used a simple Windows Forms application to use this component.
To use the component in the client, add a reference in Visual Studio .NET and 
add <code lang=cs>using ServiceInfoLib;</code> in the client code and create a instance of the 
component ( <code lang=cs>ServiceInfo srv = new ServiceInfo()  </code>) and then use the methods of the 
component. Following is the code snippet of button click events of the client application</p>

<pre lang=cs><span class="code-keyword">private</span> <span class="code-keyword">void</span> bNonDDSrvDet_Click(<span class="code-keyword">object</span> sender, System.EventArgs e)
{
    tDisp.Clear(); <span class="code-comment">//</span><span class="code-comment">textbox
</span>
    <span class="code-comment">//</span><span class="code-comment">Invokes ServiceInfo component Non Device Driver details method
</span>    <span class="code-keyword">string</span>[] s=srv.GetNonDDServicesDetails();

    <span class="code-keyword">for</span> (inti=0; i&lt;s.Length; i++)
    {
        tDisp.Text+=(s[i]+<span class="code-string">"</span><span class="code-string">\r\n"</span>);
    }

}

<span class="code-keyword">private</span> <span class="code-keyword">void</span> bDDSrvDet_Click(<span class="code-keyword">object</span> sender, System.EventArgs e)
{

    tDisp.Clear(); <span class="code-comment">//</span><span class="code-comment">textbox
</span>
    <span class="code-comment">//</span><span class="code-comment">Invokes ServiceInfo component Device Driver details method
</span>    <span class="code-keyword">string</span>[] s=srv.GetDDServicesDetails();
    <span class="code-keyword">for</span>(<span class="code-keyword">int</span> i=0;i&lt;s.Length;i++)
    {
        tDisp.Text+=(s[i]+<span class="code-string">"</span><span class="code-string">\r\n"</span>);
    }

}

<span class="code-keyword">private</span> <span class="code-keyword">void</span> bNonDDSrvStat_Click(<span class="code-keyword">object</span> sender, System.EventArgs e)
{

    tDisp.Clear();<span class="code-comment">//</span><span class="code-comment">textbox
</span>
    <span class="code-comment">//</span><span class="code-comment">Invokes ServiceInfo component Non Device Driver status method
</span>    <span class="code-keyword">string</span>[] s=srv.GetNonDDServicesStatus();
    <span class="code-keyword">for</span>(<span class="code-keyword">int</span> i=0;i&lt;s.Length;i++)
    {
        tDisp.Text+=(s[i]+<span class="code-string">"</span><span class="code-string">\r\n"</span>);
    }
}


<span class="code-keyword">private</span> <span class="code-keyword">void</span> bDDSrvStat_Click(<span class="code-keyword">object</span> sender, System.EventArgs e)
{
    tDisp.Clear();    <span class="code-comment">//</span><span class="code-comment">textbox 
</span>    
    <span class="code-comment">//</span><span class="code-comment">Invokes ServiceInfo component Device Driver status method
</span>    <span class="code-keyword">string</span>[] s=  srv.GetDDServicesStatus();
    <span class="code-keyword">for</span>(<span class="code-keyword">int</span> i=0;i&lt;s.Length;i++)
    {
        tDisp.Text+=(s[i]+<span class="code-string">"</span><span class="code-string">\r\n"</span>);
    }
}

<span class="code-keyword">private</span> <span class="code-keyword">void</span> bDDSrvFind_Click(<span class="code-keyword">object</span> sender, System.EventArgs e)
{
    tDisp.Clear(); <span class="code-comment">//</span><span class="code-comment">textbox 
</span>
    <span class="code-comment">//</span><span class="code-comment">check for Alerter service exists or not 
</span>    tDisp.Text=srv.FindService(<span class="code-string">"</span><span class="code-string">Alerter"</span>);
}

<span class="code-comment">//</span><span class="code-comment">setting the Display type property of ServiceInfo component 
</span><span class="code-keyword">private</span> <span class="code-keyword">void</span> rbDispName_CheckedChanged(<span class="code-keyword">object</span> sender, System.EventArgs e)
{
    srv.DisplayType=<span class="code-string">'</span><span class="code-string">D'</span>; <span class="code-comment">//</span><span class="code-comment">friendly Display Name 
</span>}

<span class="code-comment">//</span><span class="code-comment">setting the Display type property of ServiceInfo component
</span><span class="code-keyword">private</span> <span class="code-keyword">void</span> rbSrvName_CheckedChanged(<span class="code-keyword">object</span> sender, System.EventArgs e)
{
    srv.DisplayType=<span class="code-string">'</span><span class="code-string">S'</span>; <span class="code-comment">//</span><span class="code-comment"> Actual instance Service Name 
</span>} 

</pre>








						</div>
						<!-- Article Text End -->

						
						
						<h2>License</h2>
						<div id="LicenseTerms"><p>This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.</p><p>A list of licenses authors might use can be found <a href="/info/Licenses.aspx">here</a></p></div>
						

						
						<h2 id="ctl00_AboutHeading">About the Author</h2>

						<div class="float-right">
						<div class="lqm_ad" lqm_publisher="lqm.codeproject.site"  lqm_zone="ros" lqm_format="300x250" lqm_loadOnView='true'  lqm_tags='.NET1.0, C#, Windows, Visual-Studio, Dev, Intermediate,rating3'></div>
						</div>

						
						
<table cellpadding="0" cellspacing="5" border="0">
<tr valign="top">
<td id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberPhotoTable" valign="top" style="width:155px;">
	<b><a id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberProfileLink" href="/Members/Chandra-Hundigam">Chandra Hundigam</a></b><br /><br />
	<center><img id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberPhoto" src="/script/Membership/ProfileImages/{A0B6B116-AD78-45B0-8EA1-B5C3529E8C37}.jpg" style="border-width:0px;" /></center>

	<div class="small-text">
		<span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberJobTitle">Architect</span><br />
		<span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberCompany"></span><br />
		<span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberLocation"><img src="/script/Geo/Images/US.gif" alt="United States" width="16px" height="11px" /> United States</span><br />
		<br />
		<span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberType">Member</span><br />
		
		<br />

		
	</div>
</td>

<td>
	Chandra Hundigam has Master degree in Computer Application, Microsoft Certified Professional and Software Architect. He's significantly involved in enterprise application development and distributed object oriented system development using Microsoft .Net, Sun Java/J2EE technology to serve global giants in the Media, Finance, Mortgage and Software Industries.Presently working as Independent Software Consultant for a US-based company.His areas of interests are in emerging Technologies.<br />	
</td>
</tr>
</table><br />
						
						

						<div class="clearfix"></div>

						
						<div id="ctl00_RateArticleRow" class="clearfix voting-bar">
						<div class="float-left" style="padding-top:8px"><a class="anchorLink" href="/Articles/2944/Windows-Services-information-component#_articleTop">Article Top</a></div>
						<div class="float-right"><a id="_rating" name="_rating">&nbsp;</a></div> 
						<div class="float-right align-right">
							<div id="ctl00_RateArticle_RateItemWrapper" class="container-rating small-text" name="RateItem_2944">

	<table width="100%" cellpadding="0" cellspacing="0" class="small-text">
	<tr>
		<td id="ctl00_RateArticle_VoteResultDiv" nowrap="nowrap" align="right">
			<span class="voteRes"></span>
			<img class="loaderImg" width="16px" alt="loading..." height="16px" 
				src="/Images/animated_loading_blue.gif" style="display:none;" /> 
		</td>

	
		<td class="voteTbl" style="white-space:nowrap" align="right">
			<table class="small-text">
			<tr>
				
				<td id="ctl00_RateArticle_RateText" class="rating-prompt">
					Rate this:
				</td>

				<td id="ctl00_RateArticle_StartForm" align="right" nowrap="nowrap">
					<i>&nbsp;&nbsp;Poor</i>
				</td>

				<td id="ctl00_RateArticle_VoteFormDiv" class="nowrap">
					

					<span id="ctl00_RateArticle_RB" class="tooltip ajaxHist radio voting">
						<span id="ctl00_RateArticle_VoteRBL"><input id="ctl00_RateArticle_VoteRBL_0" type="radio" name="ctl00$RateArticle$VoteRBL" value="1" onclick="ChkRtctl00_RateArticle(1, 2944);
$(&#39;#ctl00_RateArticle_RCD&#39;).show();
;" /><input id="ctl00_RateArticle_VoteRBL_1" type="radio" name="ctl00$RateArticle$VoteRBL" value="2" onclick="ChkRtctl00_RateArticle(2, 2944);
$(&#39;#ctl00_RateArticle_RCD&#39;).show();
;" /><input id="ctl00_RateArticle_VoteRBL_2" type="radio" name="ctl00$RateArticle$VoteRBL" value="3" onclick="ChkRtctl00_RateArticle(3, 2944);
$(&#39;#ctl00_RateArticle_RCD&#39;).show();
;" /><input id="ctl00_RateArticle_VoteRBL_3" type="radio" name="ctl00$RateArticle$VoteRBL" value="4" onclick="ChkRtctl00_RateArticle(4, 2944);
$(&#39;#ctl00_RateArticle_RCD&#39;).show();
;" /><input id="ctl00_RateArticle_VoteRBL_4" type="radio" name="ctl00$RateArticle$VoteRBL" value="5" onclick="ChkRtctl00_RateArticle(5, 2944);
$(&#39;#ctl00_RateArticle_RCD&#39;).show();
;" /></span> 

						
					</span>

				</td>

				<td id="ctl00_RateArticle_EndForm" align="left">
					<i>Excellent</i>
				</td>

				<td>	
					<input type="submit" name="ctl00$RateArticle$SubmitRateBtn" value="Vote" onclick="return PostBack_ctl00_RateArticle_RateItemWrapper();" id="ctl00_RateArticle_SubmitRateBtn" class="button" />
				</td>
			</tr>
			</table>
			<span id="ctl00_RateArticle_ErrorMessage" class="error"></span>
		</td>
	</tr>
	</table>
	<div class="hover-container">
		<div id="ctl00_RateArticle_RCD" class="rating-comment align-left float-right">
			Add a reason or comment to your vote: <a href="#" id="clear-rate_ctl00_RateArticle_RCD" 
				title="close">x</a><br />
			<textarea class="RateComment" rows="5" cols="60" style="width:98%;"></textarea>
			<span id="ctl00_RateArticle_CommentReq" class="subdue">Votes of 3 or less require a comment</span>
		</div>
	</div>
</div>
						</div>
						</div>
						

					</form>

					
					<div style="margin:auto;width:728px;height:90px;margin-top:10px">		  
						<div class="lqm_ad" lqm_publisher="lqm.codeproject.site"  lqm_zone="bottom" lqm_format="728x90" lqm_loadOnView='true'  lqm_tags='.NET1.0, C#, Windows, Visual-Studio, Dev, Intermediate,pos_bottom'></div>
					</div>
					

					
					
					<h2>Comments and Discussions</h2>
					<a name="_comments" id="_comments">&nbsp;</a><div id="_MessageBoardctl00_MessageBoard" onclick="return SwitchMessage(event, null)">
	<table id="ForumTable" class="box forum" cellpadding="0" cellspacing="0">
		<tr>
			<td><table width="100%" border="0" cellpadding="3px" cellspacing="0">
				<tr class="forum-header1">
					<td colspan="2" style="white-space:nowrap;"><div class="container">
						<div class="button-newmsg float-left" onclick="FireNew(this)">
							<img src="http://s.codeproject.com/script/Forums/Images/forum_newmsg.gif" alt="new" width="16px" height="16px" border="0" align="top" /> <a href="/script/Forums/Edit.aspx?fid=9788&amp;floc=/Articles/2944/Windows-Services-information-component" name="Frm_HoverNL" title="Add a Add a Comment or Question" target="_top"><b>Add a Comment or Question</b></a>
						</div>&nbsp;<div class="float-right">
							<form action="/Search.aspx?fid=0" method="get" class="tight">
								<input type="hidden" name="fid" value="9788" /><b>Search this forum </b><input type="text" class="Frm_Input" name="qf" style="width:200px;" />&nbsp;<input type="submit" value="Go" class="button" />
							</form>
						</div>
					</div></td><tr class="forum-header2">
						<td style="white-space:nowrap;">&nbsp;<a href="/KB/FAQs/MessageBoardsFAQ.aspx"><img src="http://s.codeproject.com/script/Forums/Images/msg_question.gif" title="FAQ" alt="FAQ" style="border-width:0;width:16px;height:16px;vertical-align:middle;" /></a></td><td style="width:100%;"><div style="text-align:right;">
							<form action="/script/Forums/SetOptions.aspx?floc=%2fArticles%2f2944%2fWindows-Services-information-component&amp;fid=9788" method="get" style="margin:0;padding:0;">
								<input type="hidden" name="fid" value="9788" /><input type="hidden" name="currentQS" value="?floc=%2fArticles%2f2944%2fWindows-Services-information-component&amp;fid=9788" /><input type="hidden" name="floc" value="/Articles/2944/Windows-Services-information-component" /><input type="checkbox" name="prof" id="prof" style="vertical-align:middle;" /><label for="prof">Profile popups</label>&nbsp;&nbsp;&nbsp;&nbsp;Noise<select size="1" class="Frm_DropDown" name="noise">
									<option value="1">Very High</option><option value="2">High</option><option selected value="3">Medium</option><option value="4">Low</option><option value="5">Very Low</option>
								</select>&nbsp;&nbsp;Layout<select size="1" class="Frm_DropDown" name="view">
									<option selected value="Quick">Normal</option><option value="Topic">Expand Posts only</option><option value="Expanded">Expand Posts & Replies</option><option value="Thread">Thread View</option><option value="Normal">No Javascript</option><option value="Preview">No JS + Preview</option>
								</select>&nbsp;&nbsp;Per page<select size="1" class="Frm_DropDown" name="mpp">
									<option value="10">10</option><option selected value="25">25</option><option value="50">50</option>
								</select>&nbsp;&nbsp;&nbsp;<input type="submit" value="Update" name="SetOpt" class="button" />
							</form>
						</div></td>
					</tr>
				</tr>
			</table></td><tr>
				<td><a name="xx0xx"></a><table border="0" cellpadding="2px" cellspacing="0" width="100%">
					<tr class="forum-navbar">
						<td>&nbsp;</td><td style="text-align:right;width:50%;"> <a href="/Articles/2944/Windows-Services-information-component?fid=9788">Refresh</a></td><td class="nav-link" style="text-align:right;white-space:nowrap;"><span class="subdue">First</span> <span class="subdue">Prev</span> <span class="subdue">Next</span></td>
					</tr>
				</table></td>
			</tr><tr>
				<td><table border="0" cellpadding="0" cellspacing="0" width="100%" class="fixed-layout blank-background">
					<tr>
						<td><img src="http://s.codeproject.com/script/Forums/Images/t.gif" border="0" width="1px" height="5px" alt="" /></td>
					</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F917837_h0">
						<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr class="hover-row">
								<td width="16px" class="Frm_MsgIndent"><a name="xx917837xx"></a><img height="16px" width="16px" align="top" src="/script/Forums/Images/msg_general.gif" alt="General" /></td><td class="Frm_MsgSubject hover-container"><a class="message-link" name="917837" parent="0" thread="917837" href="/Messages/917837/Change-User-Name-and-Password.aspx">Change User Name and Password</a> <a onclick="return Pin(this);" href="#" title="Click to pin message"><img src="http://s.codeproject.com/script/Forums/Images/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px" /></a></td><td class="Frm_MsgIcon"><img border="0" src="http://s.codeproject.com/App_Themes/Std/Img/icn-member-16.gif" title="member" alt="member" height="16px" /></td><td class="Frm_MsgAuthor"><a href="/script/Membership/View.aspx?mid=1170239">Hercules01</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">0:51 7 Sep '04 &nbsp;</td>
							</tr>
						</table></td>
					</tr><tr id="F917837_h1" style="display:none;">
						<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td class="Frm_MsgIndent" style="width:16px;"><img src="http://s.codeproject.com/script/Forums/Images/t.gif" height="1px" width="16px" alt="" /></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
									<tr>
										<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td colspan="2">How can i change the User name and password of the "Logged on as" for the Service, i can't find anything about that in the .Net although there is such an option in the API.<br />
Thanks in advance.<br />
 <br /></td>
											</tr><tr style="vertical-align:middle;">
												<td class="msg-footer"><a class="button-newmsg" href="/script/Forums/Edit.aspx?fid=9788&amp;select=917837&amp;floc=/Articles/2944/Windows-Services-information-component&amp;action=r" title="Reply">Reply</a>·<a class="toolbar" href="/script/Forums/Edit.aspx?fid=9788&amp;select=917837&amp;floc=/Articles/2944/Windows-Services-information-component&amp;action=e" title="Email">Email</a>·<a class="toolbar" href="/Articles/2944/Windows-Services-information-component?fid=9788&amp;tid=917837" title="View&nbsp;Thread">View&nbsp;Thread</a>·<a class="toolbar" href="/Messages/917837/Change-User-Name-and-Password.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="/script/Bookmarks/Add.aspx?obid=917837&amp;obtid=3&amp;action=AddBookmark&amp;bio=false" title="Bookmark this post" onclick="return bookmarkMe(0,0,'/script/Bookmarks/Ajax/Add.aspx?obid=917837&obtid=3&action=AddBookmark&bio=false',false, this, this);">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF917837" style="white-space:nowrap;">2.00/5 (3 votes) <script type="text/javascript">
													MsgVFrm(1170239,917837,false,"","","");
												</script></span></td>
											</tr>
										</table></td>
									</tr>
								</table></td>
							</tr>
						</table></td>
					</tr><tr class="quick">
						<td class="root msg-divide"><img src="http://s.codeproject.com/script/Forums/Images/t.gif" border="0" width="1px" height="1px" alt="" /></td>
					</tr><tr class="MsgHd Rt HdUnSel " id="F577639_h0">
						<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr class="hover-row">
								<td width="16px" class="Frm_MsgIndent"><a name="xx577639xx"></a><img height="16px" width="16px" align="top" src="/script/Forums/Images/msg_question.gif" alt="Question" /></td><td class="Frm_MsgSubject hover-container"><a class="message-link" name="577639" parent="0" thread="577639" href="/Messages/577639/Are-Csharp-services-able-to-pause.aspx">Are C# services able to pause?</a> <a onclick="return Pin(this);" href="#" title="Click to pin message"><img src="http://s.codeproject.com/script/Forums/Images/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px" /></a></td><td class="Frm_MsgIcon"><img border="0" src="http://s.codeproject.com/App_Themes/Std/Img/icn-member-16.gif" title="member" alt="member" height="16px" /></td><td class="Frm_MsgAuthor"><a href="/script/Membership/View.aspx?mid=522190">scotmc</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">0:02 9 Aug '03 &nbsp;</td>
							</tr>
						</table></td>
					</tr><tr id="F577639_h1" style="display:none;">
						<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td class="Frm_MsgIndent" style="width:16px;"><img src="http://s.codeproject.com/script/Forums/Images/t.gif" height="1px" width="16px" alt="" /></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
									<tr>
										<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td colspan="2">I have a service generated by the VS.NET >> New C# Project >> Windows Service that doesn't seem to be able to pause, so I am wondering if this is a supported scenario?  Sample code appreciated...  <br />
&nbsp;<br />
TIA,<br />
&nbsp;<br />
Scott <br /></td>
											</tr><tr style="vertical-align:middle;">
												<td class="msg-footer"><a class="button-newmsg" href="/script/Forums/Edit.aspx?fid=9788&amp;select=577639&amp;floc=/Articles/2944/Windows-Services-information-component&amp;action=r" title="Reply">Reply</a>·<a class="toolbar" href="/script/Forums/Edit.aspx?fid=9788&amp;select=577639&amp;floc=/Articles/2944/Windows-Services-information-component&amp;action=e" title="Email">Email</a>·<a class="toolbar" href="/Articles/2944/Windows-Services-information-component?fid=9788&amp;tid=577639" title="View&nbsp;Thread">View&nbsp;Thread</a>·<a class="toolbar" href="/Messages/577639/Are-Csharp-services-able-to-pause.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="/script/Bookmarks/Add.aspx?obid=577639&amp;obtid=3&amp;action=AddBookmark&amp;bio=false" title="Bookmark this post" onclick="return bookmarkMe(0,0,'/script/Bookmarks/Ajax/Add.aspx?obid=577639&obtid=3&action=AddBookmark&bio=false',false, this, this);">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF577639" style="white-space:nowrap;"><script type="text/javascript">
													MsgVFrm(522190,577639,false,"","","");
												</script></span></td>
											</tr>
										</table></td>
									</tr>
								</table></td>
							</tr>
						</table></td>
					</tr><tr class="quick">
						<td class="root msg-divide"><img src="http://s.codeproject.com/script/Forums/Images/t.gif" border="0" width="1px" height="1px" alt="" /></td>
					</tr><tr class="MsgHd Rt HdUnSel " id="F482895_h0">
						<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr class="hover-row">
								<td width="16px" class="Frm_MsgIndent"><a name="xx482895xx"></a><img height="16px" width="16px" align="top" src="/script/Forums/Images/msg_question.gif" alt="Question" /></td><td class="Frm_MsgSubject hover-container"><a class="message-link" name="482895" parent="0" thread="482895" href="/Messages/482895/Why-not-include-a-project-solution-file-with-it.aspx">Why not include a project/solution file with it???</a> <a onclick="return Pin(this);" href="#" title="Click to pin message"><img src="http://s.codeproject.com/script/Forums/Images/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px" /></a></td><td class="Frm_MsgIcon"><img border="0" src="http://s.codeproject.com/App_Themes/Std/Img/icn-member-16.gif" title="member" alt="member" height="16px" /></td><td class="Frm_MsgAuthor"><a href="/script/Membership/View.aspx?mid=73491">Zhefu Zhang</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">13:46 25 Apr '03 &nbsp;</td>
							</tr>
						</table></td>
					</tr><tr id="F482895_h1" style="display:none;">
						<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td class="Frm_MsgIndent" style="width:16px;"><img src="http://s.codeproject.com/script/Forums/Images/t.gif" height="1px" width="16px" alt="" /></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
									<tr>
										<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td colspan="2">So the reader can compile instantly? It does not hurt any side, doesn't it <br /></td>
											</tr><tr style="vertical-align:middle;">
												<td class="msg-footer"><a class="button-newmsg" href="/script/Forums/Edit.aspx?fid=9788&amp;select=482895&amp;floc=/Articles/2944/Windows-Services-information-component&amp;action=r" title="Reply">Reply</a>·<a class="toolbar" href="/script/Forums/Edit.aspx?fid=9788&amp;select=482895&amp;floc=/Articles/2944/Windows-Services-information-component&amp;action=e" title="Email">Email</a>·<a class="toolbar" href="/Articles/2944/Windows-Services-information-component?fid=9788&amp;tid=482895" title="View&nbsp;Thread">View&nbsp;Thread</a>·<a class="toolbar" href="/Messages/482895/Why-not-include-a-project-solution-file-with-it.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="/script/Bookmarks/Add.aspx?obid=482895&amp;obtid=3&amp;action=AddBookmark&amp;bio=false" title="Bookmark this post" onclick="return bookmarkMe(0,0,'/script/Bookmarks/Ajax/Add.aspx?obid=482895&obtid=3&action=AddBookmark&bio=false',false, this, this);">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF482895" style="white-space:nowrap;"><script type="text/javascript">
													MsgVFrm(73491,482895,false,"","","");
												</script></span></td>
											</tr>
										</table></td>
									</tr>
								</table></td>
							</tr>
						</table></td>
					</tr><tr class="quick">
						<td class="root msg-divide"><img src="http://s.codeproject.com/script/Forums/Images/t.gif" border="0" width="1px" height="1px" alt="" /></td>
					</tr><tr class="MsgHd Rt HdUnSel " id="F295904_h0">
						<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr class="hover-row">
								<td width="16px" class="Frm_MsgIndent"><a name="xx295904xx"></a><img height="16px" width="16px" align="top" src="/script/Forums/Images/msg_general.gif" alt="General" /></td><td class="Frm_MsgSubject hover-container"><a class="message-link" name="295904" parent="0" thread="295904" href="/Messages/295904/NT-2000-Cplusplus.aspx">NT/2000/C++</a> <a onclick="return Pin(this);" href="#" title="Click to pin message"><img src="http://s.codeproject.com/script/Forums/Images/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px" /></a></td><td class="Frm_MsgIcon"><img border="0" src="http://s.codeproject.com/App_Themes/Std/Img/icn-member-16.gif" title="member" alt="member" height="16px" /></td><td class="Frm_MsgAuthor"><a href="/script/Membership/View.aspx?mid=40236">yaronkl</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">1:58 28 Sep '02 &nbsp;</td>
							</tr>
						</table></td>
					</tr><tr id="F295904_h1" style="display:none;">
						<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td class="Frm_MsgIndent" style="width:16px;"><img src="http://s.codeproject.com/script/Forums/Images/t.gif" height="1px" width="16px" alt="" /></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
									<tr>
										<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td colspan="2">This looks very usefull. can this code be used as a base to run on NT/2000 with C++? Or does it use code specific to C# and/or .NET?<br />
thank you.<br />
 <br /></td>
											</tr><tr style="vertical-align:middle;">
												<td class="msg-footer"><a class="button-newmsg" href="/script/Forums/Edit.aspx?fid=9788&amp;select=295904&amp;floc=/Articles/2944/Windows-Services-information-component&amp;action=r" title="Reply">Reply</a>·<a class="toolbar" href="/script/Forums/Edit.aspx?fid=9788&amp;select=295904&amp;floc=/Articles/2944/Windows-Services-information-component&amp;action=e" title="Email">Email</a>·<a class="toolbar" href="/Articles/2944/Windows-Services-information-component?fid=9788&amp;tid=295904" title="View&nbsp;Thread">View&nbsp;Thread</a>·<a class="toolbar" href="/Messages/295904/NT-2000-Cplusplus.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="/script/Bookmarks/Add.aspx?obid=295904&amp;obtid=3&amp;action=AddBookmark&amp;bio=false" title="Bookmark this post" onclick="return bookmarkMe(0,0,'/script/Bookmarks/Ajax/Add.aspx?obid=295904&obtid=3&action=AddBookmark&bio=false',false, this, this);">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF295904" style="white-space:nowrap;">4.20/5 (2 votes) <script type="text/javascript">
													MsgVFrm(40236,295904,false,"","","");
												</script></span></td>
											</tr>
										</table></td>
									</tr>
								</table></td>
							</tr>
						</table></td>
					</tr><tr>
						<td><img src="http://s.codeproject.com/script/Forums/Images/t.gif" border="0" width="1px" height="5px" alt="" /></td>
					</tr>
				</table></td>
			</tr><tr>
				<td><table width="100%" cellpadding="2px" cellspacing="0">
					<tr class="forum-footer">
						<td>Last Visit: 20:14 28 May '12  &nbsp; &nbsp; Last Update: 16:20 28 May '12 </td><td class="nav-link" style="text-align:right;white-space:nowrap;"><input id="_mbnUrl" type="hidden" value="/Articles/2944/Windows-Services-information-component?fid=9788&amp;fr=6" /><b>1</b></td>
					</tr>
				</table></td>
			</tr>
		</tr>
	</table>
</div><p class="small-text"><img align="top" src="/script/Forums/Images/msg_general.gif" width="16px" height="16px" alt="General" /> General &nbsp;&nbsp; <img align="top" src="/script/Forums/Images/msg_news.gif" width="16px" height="16px" alt="News" /> News &nbsp;&nbsp; <img align="top" src="/script/Forums/Images/msg_idea.gif" width="16px" height="16px" alt="Suggestion" /> Suggestion &nbsp;&nbsp; <img align="top" src="/script/Forums/Images/msg_question.gif" width="16px" height="16px" alt="Question" /> Question &nbsp;&nbsp; <img align="top" src="/script/Forums/Images/msg_bug.gif" width="16px" height="16px" alt="Bug" /> Bug &nbsp;&nbsp; <img align="top" src="/script/Forums/Images/msg_answer.gif" width="16px" height="16px" alt="Answer" /> Answer &nbsp;&nbsp; <img align="top" src="/script/Forums/Images/msg_joke.gif" width="16px" height="16px" alt="Joke" /> Joke &nbsp;&nbsp; <img align="top" src="/script/Forums/Images/msg_rant.gif" width="16px" height="16px" alt="Rant" /> Rant &nbsp;&nbsp; <img align="top" src="/script/Forums/Images/msg_admin.gif" width="16px" height="16px" alt="Admin" /> Admin &nbsp;&nbsp; </p><p class="small-text">Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.</p>

					
					<div class="theme1-background" style="height:2px"></div>

					<div class="extended tiny-text">
						<div class="row">
							<div class="float-left">
								<a id="ctl00_PermaLink" href="/Articles/2944/Windows-Services-information-component">Permalink</a> | 
								<a id="ctl00_AdvertiseLink" href="http://lakequincy.com/">Advertise </a> |
								<a id="ctl00_PrivacyLink" href="/info/privacy.aspx">Privacy</a> |
								<a id="ctl00_Mobile" rel="nofollow" href="/Articles/2944/Windows-Services-information-component?display=Mobile">Mobile</a>
								<br />
								
								Web02 |
								2.5.120528.1 |
								Last Updated 26 Sep 2002								
							</div>
							<div class="float-right align-right">
								Article Copyright 2002 by Chandra Hundigam<br />Everything else
								Copyright &copy; <a href="mailto:webmaster@codeproject.com">CodeProject</a>, 1999-2012 <br />
								<a id="ctl00_TermsOfUseLink" href="/info/TermsOfUse.aspx">Terms of Use</a>
							</div>

							


<div class="page-width">
Layout: <a id="ctl00_PageWidth_FixedT" title="Fixed width layout" rel="nofollow" class=" active" href="/Articles/2944/Windows-Services-information-component?PageFlow=FixedWidth">fixed</a>
|
<a id="ctl00_PageWidth_FluidT" title="Fluid layout" rel="nofollow" href="/Articles/2944/Windows-Services-information-component?PageFlow=Fluid">fluid</a>
</div>



						</div>
					</div>
					

				<br clear="all" />
		
				
				</div>

				<div id="ctl00_ContentSide" class="text-sidebar">
					

					

					

					
<div class="announce">

<div class="announce-content">

<div>Hot News: <a id="ctl00_News_News_ctl01_Link" href="http://www.neowin.net/news/windows-8-boots-too-quickly-first-world-os-problem">Windows 8 boots too quickly, first world OS problem</a></div>

The Code Project Insider. <a id="ctl00_News_News_ctl02_Subscribe" href="/Feature/Insider/">Free each morning.</a>
</div>
</div>

						
					<div style="width:160px;margin: 10px 0;">
						<div class="lqm_ad" lqm_publisher="lqm.codeproject.site"  lqm_zone="ros" lqm_format="160x600" lqm_tags='.NET1.0, C#, Windows, Visual-Studio, Dev, Intermediate,rating3'></div>
					</div>

					
	<div class="announce">
	<div id="ctl00_RelatedArticles_RelatedResults_ctl00_header" class="announce-header">Related Articles</div>
	<div class="announce-content">	
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl01_Link" class="title" href="/KB/cs/ServiceController.aspx">A ServiceController Class that Contains the Path to the Executable</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl02_Link" class="title" href="/KB/system/Svc_Controller_in_C_Sharp.aspx">Using the ServiceController in C# to stop and start a service</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl03_Link" class="title" href="/KB/system/extendservicecontroller.aspx">Extend ServiceController class to change the StartupType of Windows Services</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl04_Link" class="title" href="/Tips/243290/Manage-All-Windows-Services.aspx">Manage All Windows Services</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl05_Link" class="title" href="/KB/cs/HowTo_myServiceManager.aspx">How To Manage Windows Service Application on our Local Computer</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl06_Link" class="title" href="/KB/cs/svcmgr.aspx">Command Line Windows Services Manager</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl07_Link" class="title" href="/KB/cs/Service_Monitor_Central.aspx">Monitor and Manage Services on Remote Machines</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl08_Link" class="title" href="/KB/cs/service_controller.aspx">Service Controller</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl09_Link" class="title" href="/KB/cs/winservicemanage.aspx">Windows Service Management</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl11_Link" class="title" href="/KB/webservices/Web_Method_To_Restart_NT.aspx">Create a Web Service Method to Manage a NT Service</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl12_Link" class="title" href="/KB/webservices/Web_Method_To_Get_NT_Serv.aspx">Create A Web Service Method to Get NT Service Information</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl13_Link" class="title" href="/KB/cs/Service_Manager.aspx">Service Manager</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl14_Link" class="title" href="/KB/system/ServiceDebug.aspx">How to Start and Debug a Windows Service with Visual Studio 2008</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl15_Link" class="title" href="/KB/system/Services.aspx">Using .NET 2.0 to Create a Windows Service</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl16_Link" class="title" href="/KB/install/csharpsvclesson2.aspx">Creating a C# Service Step-by-Step Lesson II</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl17_Link" class="title" href="/KB/IP/Chat_Application.aspx">Chat Application with Windows Services, .NET Remoting in C#</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl18_Link" class="title" href="/KB/system/Download_Limiter.aspx">Internet Download Limiter</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl19_Link" class="title" href="/KB/IP/HostingMultipleServices.aspx">Hosting multiple services in separate AppDomains</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl20_Link" class="title" href="/KB/dotnet/netdiagnostics3.aspx">.NET Diagnostics - III, Enumerate System Services and Dependencies Using C#</a>
		
	</div>
	
	<div class="container-related-item">
		<a id="ctl00_RelatedArticles_RelatedResults_ctl21_Link" class="title" href="/KB/cs/hoytsoft_servicebase.aspx">Self installing .NET service using the Win32 API</a>
		
	</div>
	
	</div>
	</div>
	


					

				</div>

			</div>
			

		</div>
		

	</div>
</div>


<div style="display:none;" id="lqm_AdTable">
	
</div>

<script type="text/javascript" language="Javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script><script type='text/javascript'>//<![CDATA[
if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src='/script/JS/jquery-1.6.2.min.js' type='text/javascript' %3E%3C/script%3E"));
}//]]></script>
<script type="text/javascript" language="Javascript" src="http://s.codeproject.com/script/Articles/JS/article.min.js?dt=2.5.120528.1"></script>
<script type="text/javascript" language="Javascript" src="http://s.codeproject.com/script/JS/navbar.min.js?dt=2.5.120528.1"></script>
<script type="text/javascript" language="Javascript" src="/Script/JS/m.min.js?dt=2.5.120528.1"></script>
<script type="text/javascript" language="Javascript">//<![CDATA[
function markAllText(){
 markTextInElement('ServiceControl','contentdiv');
}
$(function(){markAllText()});
var socialLinks = new social();
socialLinks.PlaceholderId="ATD";socialLinks.ObjectId=2944;
socialLinks.ObjectTypeId=2;
socialLinks.addtoMethod=1;
socialLinks.Horizontal=false;
socialLinks.Showname=true;
socialLinks.setupLinks("socialLinks", escape(document.location.href),escape(document.title), 100, 0, "small-text Bold", "AddTo");
socialLinks.setupMenu();
$(document).ready(function() {   $('.alert-bar').slideDown('fast');   $('.alert-bar a.close-notify').click(function() {      $('.alert-bar').slideUp('fast');        return false;    });});
if($.LqmAds)$.LqmAds();
var oSrchFlt = false, oSrchBox=false,srchBoxFoc=false;
$(document).ready(function() {
 if(InitWatermark)InitWatermark('sb_tb', 'Search site');
 var sbar = $('#sb_tb'); 
 var sfilter = $('#SearchFilter');
 if (sbar && sfilter) {
  sfilter.removeClass('popup'); sfilter.hide();
  sbar.blur(function() { if (!oSrchFlt)sfilter.hide();srchBoxFoc=false; });
  sbar.focus(function() { oSrchFlt=false;srchBoxFoc=true;sfilter.show(); });
  sbar.mouseleave(function() { oSrchBox=false; });
  sbar.mouseover(function() { oSrchBox=true; });
  sfilter.mouseleave(function() { oSrchFlt=false; if (!srchBoxFoc&&!oSrchBox)sfilter.hide();});
  sfilter.mouseover(function() { oSrchFlt=true; });
 }
});
$(document).ready(function() { anchorAnimate(); });
var reportingMemberId = 8126139;
$("#ctl00_RateArticle_RateItemWrapper").removeClass("container-rating");$('#clear-rate_ctl00_RateArticle_RCD').click(function () { $('#ctl00_RateArticle_RCD').hide(); return false;});
function PostBack_ctl00_RateArticle_RateItemWrapper() {
  return rateItem(2944,2,1,true,true,3);
}
function ChkRtctl00_RateArticle(val, objId) {if (val<=3||true) {
$('div[name=RateItem_' + objId + '] .rating-comment').css("display","");}
else $('div[name=RateItem_' + objId + '] .rating-comment').css("display","none");}


//]]>
</script>

</body>
</html>
